opnsense-src/tools/regression/usr.bin/make/shell/select/Makefile
Hartmut Brandt 56f5aba2ca Some test cases for .SHELL target: builtin shell selection and
changing the path of a builtin shell.
2005-05-19 11:23:01 +00:00

33 lines
576 B
Makefile

#
# We just select the builtin shells and check whether it is really
# executed. This should print just the shell paths. Because we
# normally don't have a ksh, we make this test conditional. This means
# one has to recreate the test results once ksh is installed.
#
# $FreeBSD$
#
all:
@${MAKE} sh
@${MAKE} csh
@if [ -x /bin/ksh ] ; then ${MAKE} ksh ; fi
.ifmake sh
.SHELL: name=sh
sh: print_path
.elifmake csh
.SHELL: name=csh
csh: print_path
.elifmake ksh
.SHELL: name=ksh
ksh: print_path
.endif
print_path:
@ps -opid,command | awk '$$1=='$$$$' { print $$2; }'