1 # $NetBSD: deptgt-end-fail.mk,v 1.6 2020/12/07 01:04:07 rillig Exp $
3 # Tests for an errors in the main target, its dependencies,
4 # the .END node and its dependencies.
6 # Before 2020-11-25, an error in the .END target did not print the "Stop.",
7 # even though this was intended. The cause for this was a missing condition
8 # in Compat_Run, in the code handling the .END node.
12 # The default stop-on-error mode is not as interesting to test since it
13 # stops right after the first error.
17 . for all-dep in ok ERR
19 . for end-dep in ok ERR
20 . for target in ${all}-${all-dep}-${end}-${end-dep}
22 ${target}: .PHONY .SILENT
23 echo Test case all=${all} all-dep=${all-dep} end=${end} end-dep=${end-dep}.
24 ${MAKE} -r -f ${MAKEFILE} \
25 all=${all} all-dep=${all-dep} \
26 end=${end} end-dep=${end-dep} \
28 echo "exit status $$?"
39 all all-dep end-dep: .PHONY
45 : Making ${.TARGET} from ${.ALLSRC}.
49 : Making ${.TARGET} out of nothing.
53 : Making ${.TARGET} from ${.ALLSRC}.
57 : Making ${.TARGET} out of nothing.
62 # Until 2020-12-07, several of the test cases printed "`all' not remade
63 # because of errors.", followed by "exit status 0", which contradicted
66 # Until 2020-12-07, '.END' was even made if 'all' failed, but if a dependency
67 # of 'all' failed, it was skipped. This inconsistency was not needed for
68 # anything and thus has been dropped. To run some commands on error, use the
69 # .ERROR target instead, see deptgt-error.mk.