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