Sat Aug 29 15:06:33 2020 UTC ()
make(1): add test for the special .IGNORE dependency source


(rillig)
diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/depsrc-ignore.exp
diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/depsrc-ignore.mk

cvs diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/depsrc-ignore.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/depsrc-ignore.exp 2020/08/16 12:07:51 1.1
+++ src/usr.bin/make/unit-tests/depsrc-ignore.exp 2020/08/29 15:06:33 1.2

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/depsrc-ignore.mk (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/depsrc-ignore.mk 2020/08/16 14:25:16 1.2
+++ src/usr.bin/make/unit-tests/depsrc-ignore.mk 2020/08/29 15:06:33 1.3
@@ -1,8 +1,33 @@ @@ -1,8 +1,33 @@
1# $NetBSD: depsrc-ignore.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ 1# $NetBSD: depsrc-ignore.mk,v 1.3 2020/08/29 15:06:33 rillig Exp $
2# 2#
3# Tests for the special source .IGNORE in dependency declarations. 3# Tests for the special source .IGNORE in dependency declarations,
 4# which ignores any command failures for that target.
 5#
 6# Even though ignore-errors fails, the all target is still made.
 7# Since the all target is not marked with .IGNORE, it stops at the
 8# first failing command.
 9#
 10# XXX: The messages in the output are confusing.
 11# The "ignored" comes much too late to be related to the "false
 12# ignore-errors".
 13# The "continuing" is confusing as well since it doesn't answer the
 14# question "continuing with what?".
 15#
 16# Even more interestingly, enabling the debugging option -de changes
 17# the order in which the messages appear. Now the "ignored" message
 18# is issued in the correct position. The manual page even defines the
 19# buffering of debug_file and stdout, so there should be no variance.
 20
 21#.MAKEFLAGS: -de
 22
 23all: ignore-errors
4 24
5# TODO: Implementation 25ignore-errors: .IGNORE
 26 @echo $@ begin
 27 false $@
 28 @echo $@ end
6 29
7all: 30all:
8 @:; 31 @echo $@ begin
 32 false $@
 33 @echo $@ end