Module Name:    src
Committed By:   rillig
Date:           Sun Nov  8 22:45:51 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: directive-ifmake.mk

Log Message:
make(1): add test for .ifmake 0 and .ifmake 1


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/directive-ifmake.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-ifmake.mk
diff -u src/usr.bin/make/unit-tests/directive-ifmake.mk:1.5 src/usr.bin/make/unit-tests/directive-ifmake.mk:1.6
--- src/usr.bin/make/unit-tests/directive-ifmake.mk:1.5	Fri Nov  6 20:29:35 2020
+++ src/usr.bin/make/unit-tests/directive-ifmake.mk	Sun Nov  8 22:45:51 2020
@@ -1,4 +1,4 @@
-# $NetBSD: directive-ifmake.mk,v 1.5 2020/11/06 20:29:35 rillig Exp $
+# $NetBSD: directive-ifmake.mk,v 1.6 2020/11/08 22:45:51 rillig Exp $
 #
 # Tests for the .ifmake directive, which provides a shortcut for asking
 # whether a certain target is requested to be made from the command line.
@@ -51,5 +51,15 @@
 .  info No, targets cannot be added at parse time anymore.
 .endif
 
+# Numbers are interpreted as numbers, no matter whether the directive is
+# a plain .if or an .ifmake.
+.ifmake 0
+.  error
+.endif
+.ifmake 1
+.else
+.  error
+.endif
+
 first second unmentioned late-target:
 	: $@

Reply via email to