summaryrefslogtreecommitdiffstats
path: root/tools/regression/usr.bin/make/shell/path_select/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/regression/usr.bin/make/shell/path_select/Makefile')
-rw-r--r--tools/regression/usr.bin/make/shell/path_select/Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/regression/usr.bin/make/shell/path_select/Makefile b/tools/regression/usr.bin/make/shell/path_select/Makefile
new file mode 100644
index 0000000..6b74a41
--- /dev/null
+++ b/tools/regression/usr.bin/make/shell/path_select/Makefile
@@ -0,0 +1,40 @@
+#
+# Change the path for builtin shells. There are two methods to do this.
+# This is the second of them when both a path and a name are specified.
+# This selects a builtin shell according to the name, but executes it
+# from the specified path.
+#
+# Be sure to include a meta-character into the command line, so that
+# really our shell is executed.
+#
+# $FreeBSD$
+#
+
+all: shell
+ @${MAKE} sh_test
+ @${MAKE} csh_test
+ @if [ -x /bin/ksh ] ; then ${MAKE} ksh_test ; fi
+
+shell: sh.sh
+ @cp ${.CURDIR}/sh.sh ${.OBJDIR}/shell
+ @chmod +x ${.OBJDIR}/shell
+
+.ifmake sh_test
+
+.SHELL: name=sh path=${.OBJDIR}/shell
+sh_test:
+ @: This is the shell.
+
+.elifmake csh_test
+
+.SHELL: name=csh path=${.OBJDIR}/shell
+csh_test:
+ @: This is the C-shell.
+
+.elifmake ksh_test
+
+.SHELL: name=ksh path=${.OBJDIR}/shell
+ksh_test:
+ @: This is the Korn-shell.
+
+.endif
OpenPOWER on IntegriCloud