git: <sys.mk>: Fix ${SHELL} to ignore the environment
Aaron LI
aly at crater.dragonflybsd.org
Sat Apr 4 21:41:57 PDT 2026
commit 958532e26a930505ae3ebf66d94d0c9dde9cd487
Author: Aaron LI <aly at aaronly.me>
Date: Sun Apr 5 12:12:24 2026 +0800
<sys.mk>: Fix ${SHELL} to ignore the environment
From the POSIX standard [1]:
> The SHELL macro shall be treated specially. It shall be provided by
> make and set to the pathname of the shell command language interpreter
> (see sh). The SHELL environment variable shall not affect the value of
> the SHELL macro. If SHELL is defined in the makefile or is specified
> on the command line, it shall replace the original value of the SHELL
> macro, but shall not affect the SHELL environment variable. Other
> effects of defining SHELL in the makefile or on the command line are
> implementation-defined.
So fix ${SHELL} to be ${.SHELL:Ush}, making it a Bourne/POSIX shell
regardless of the user's interactive shell, so that it's suitable for
use in the makefiles. This is obtained from 'contrib/bmake/mk/sys.mk'.
[1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/make.html#tag_20_76_13_05
Summary of changes:
share/mk/sys.mk | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/958532e26a930505ae3ebf66d94d0c9dde9cd487
--
DragonFly BSD source repository
More information about the Commits
mailing list