mirror of
https://github.com/opnsense/src.git
synced 2026-04-28 09:37:08 -04:00
on the command line and really executes the shell instead of directly executing the command.
30 lines
620 B
Makefile
30 lines
620 B
Makefile
#
|
|
# In compat mode (the default without -j) a line that contains no shell
|
|
# meta characters and no shell builtins is not passed to the shell but
|
|
# executed directly. In our example the ls line without meta characters
|
|
# will really execute ls, while the line with meta characters will execute
|
|
# our special shell.
|
|
#
|
|
# $FreeBSD$
|
|
|
|
all: sh
|
|
@MAKEFLAGS= ${MAKE} -B no-builtin
|
|
@MAKEFLAGS= ${MAKE} -B builtin
|
|
|
|
sh: sh.sh
|
|
@cp ${.CURDIR}/sh.sh ${.OBJDIR}/sh
|
|
@chmod +x ${.OBJDIR}/sh
|
|
|
|
.ifmake builtin || no-builtin
|
|
|
|
.SHELL: path="${.OBJDIR}/sh"
|
|
|
|
.PHONY: builtin no-builtin
|
|
|
|
builtin:
|
|
@exec ls -d .
|
|
|
|
no-builtin:
|
|
@ls -d .
|
|
|
|
.endif
|