The right way to invoke sh from a freebsd makefile?

From: Ian Lepore <ian_at_FreeBSD.org>
Date: Sun, 22 Sep 2013 17:18:25 -0600
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
Received on Sun Sep 22 2013 - 21:18:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:41 UTC