Module Name: src Committed By: rillig Date: Fri Dec 3 22:48:07 UTC 2021
Modified Files: src/usr.bin/make/unit-tests: directive-include.exp directive-include.mk Log Message: tests/make: demonstrate .include with erroneous expression To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/directive-include.exp cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/directive-include.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/unit-tests/directive-include.exp diff -u src/usr.bin/make/unit-tests/directive-include.exp:1.5 src/usr.bin/make/unit-tests/directive-include.exp:1.6 --- src/usr.bin/make/unit-tests/directive-include.exp:1.5 Fri Dec 3 22:43:50 2021 +++ src/usr.bin/make/unit-tests/directive-include.exp Fri Dec 3 22:48:07 2021 @@ -4,6 +4,8 @@ CondParser_Eval: ${.MAKE.MAKEFILES:T} != lhs = "directive-include.mk null", rhs = "directive-include.mk null", op = != make: "directive-include.mk" line 25: Could not find nonexistent.mk make: "directive-include.mk" line 47: Could not find " +make: "directive-include.mk" line 52: Unknown modifier "Z" +make: "directive-include.mk" line 52: Could not find nonexistent.mk make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/directive-include.mk diff -u src/usr.bin/make/unit-tests/directive-include.mk:1.6 src/usr.bin/make/unit-tests/directive-include.mk:1.7 --- src/usr.bin/make/unit-tests/directive-include.mk:1.6 Fri Dec 3 22:43:50 2021 +++ src/usr.bin/make/unit-tests/directive-include.mk Fri Dec 3 22:48:07 2021 @@ -1,4 +1,4 @@ -# $NetBSD: directive-include.mk,v 1.6 2021/12/03 22:43:50 rillig Exp $ +# $NetBSD: directive-include.mk,v 1.7 2021/12/03 22:48:07 rillig Exp $ # # Tests for the .include directive, which includes another file. @@ -46,4 +46,9 @@ DEV= null DQUOT= " .include "${DQUOT}" +# When the expression in a filename cannot be evaluated, the failing +# expression is skipped and the file is included nevertheless. +# FIXME: Add proper error handling, no file must be included here. +.include "nonexistent${:U123:Z}.mk" + all: