1 # $NetBSD: sh-dots.mk,v 1.1 2020/08/22 11:27:02 rillig Exp $
3 # Tests for the special shell command line "...", which does not run the
4 # commands below it but appends them to the list of commands that are run
7 all: first hidden repeated commented
9 # The ${.TARGET} correctly expands to the target name, even though the
10 # commands are run separately from the main commands.
12 @echo first ${.TARGET}
14 @echo first delayed ${.TARGET}
16 # The dots cannot be prefixed by the usual @-+ characters.
17 # They must be written exactly as dots.
19 @echo hidden ${.TARGET}
21 @echo hidden delayed ${.TARGET}
23 # Since the shell command lines don't recognize '#' as comment character,
24 # the "..." is not interpreted specially here.
26 @echo commented ${.TARGET}
27 ... # Run the below commands later
28 @echo commented delayed ${.TARGET}
30 # The "..." can appear more than once, even though that doesn't make sense.
31 # The second "..." is a no-op.
33 @echo repeated ${.TARGET}
35 @echo repeated delayed ${.TARGET}
37 @echo repeated delayed twice ${.TARGET}