From owner-freebsd-current@FreeBSD.ORG Sun Sep 22 23:18:30 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D3E179CB; Sun, 22 Sep 2013 23:18:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AAF2B2DAE; Sun, 22 Sep 2013 23:18:30 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VNsv7-00017t-6T; Sun, 22 Sep 2013 23:18:29 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r8MNIQom022737; Sun, 22 Sep 2013 17:18:26 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19V8/gGvFRosNvZbXNPKZve Subject: The right way to invoke sh from a freebsd makefile? From: Ian Lepore To: FreeBSD Hackers , freebsd-current Content-Type: text/plain; charset="us-ascii" Date: Sun, 22 Sep 2013 17:18:25 -0600 Message-ID: <1379891905.1197.115.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 23:18:30 -0000 What's the right way to launch the bourne shell from a makefile? I had assumed the ${SHELL} variable would be set to "the right" copy of /bin/sh (like maybe the one in tmp or legacy at various stages). It appears that that's not the case, and ${SHELL} is whatever comes from the environment, which can lead to using csh or bash or whatever. I see some of our makefiles use just a bare "sh" which seems reasonable to me, but I don't want to glitch this in src/include/Makefile again. The goal is to run a script in src/include/Makefile by launching sh with the script name (as opposed to launching the script and letting the #! do its thing, which doesn't work if the source dir is mounted noexec). -- Ian