blob: 6fe42abe0ef59a99437fb31aa4689878adfcc76a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#
# 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
|