summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/Makefile
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-08-16 23:31:43 +0000
committergreen <green@FreeBSD.org>2000-08-16 23:31:43 +0000
commitdc14c5e4fd05e3b9cfa3c48ed029ab111dd48329 (patch)
treecc0e62b51ed1e79e231d912ec8759b2cd884047f /usr.bin/make/Makefile
parentd5af96afa040e66ed2df0eeeb0dc4ec7349132cc (diff)
downloadFreeBSD-src-dc14c5e4fd05e3b9cfa3c48ed029ab111dd48329.zip
FreeBSD-src-dc14c5e4fd05e3b9cfa3c48ed029ab111dd48329.tar.gz
Allow use of the ${MAKE_SHELL} variable to specify alternate shells for
make(1) to use. Setting it to "sh" and "ksh" are the only values which work right ATM; I wouldn't expect "csh" to get you far ;)
Diffstat (limited to 'usr.bin/make/Makefile')
-rw-r--r--usr.bin/make/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/usr.bin/make/Makefile b/usr.bin/make/Makefile
index da2c13d..7ef58f8 100644
--- a/usr.bin/make/Makefile
+++ b/usr.bin/make/Makefile
@@ -12,4 +12,20 @@ SRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
.PATH: ${.CURDIR}/lst.lib
+# Set the shell which make(1) uses. Bourne is the default, but a decent
+# Korn shell works fine, and much faster. Using the C shell for this
+# will almost certainly break everything, but it's Unix tradition to
+# allow you to shoot yourself in the foot if you want to :-)
+
+MAKE_SHELL?= sh
+.if ${MAKE_SHELL} == "csh"
+CFLAGS+= -DDEFSHELL=0
+.elif ${MAKE_SHELL} == "sh"
+CFLAGS+= -DDEFSHELL=1
+.elif ${MAKE_SHELL} == "ksh"
+CFLAGS+= -DDEFSHELL=2
+.else
+.error "MAKE_SHELL must be set to one of \"csh\", \"sh\" or \"ksh\"."
+.endif
+
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud