Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): add test for .ifmake 0 and ...



details:   https://anonhg.NetBSD.org/src/rev/8071ba0b566b
branches:  trunk
changeset: 956879:8071ba0b566b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Nov 08 22:45:51 2020 +0000

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

diffstat:

 usr.bin/make/unit-tests/directive-ifmake.mk |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r f76c29ac6abe -r 8071ba0b566b usr.bin/make/unit-tests/directive-ifmake.mk
--- a/usr.bin/make/unit-tests/directive-ifmake.mk       Sun Nov 08 22:44:05 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-ifmake.mk       Sun Nov 08 22:45:51 2020 +0000
@@ -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:
        : $@



Home | Main Index | Thread Index | Old Index