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): document what the directive...



details:   https://anonhg.NetBSD.org/src/rev/543af4e9cb2f
branches:  trunk
changeset: 942489:543af4e9cb2f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Nov 08 21:33:05 2020 +0000

description:
make(1): document what the directive ".if A&B" means

diffstat:

 usr.bin/make/unit-tests/cond-func.mk |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 53b78f017c6b -r 543af4e9cb2f usr.bin/make/unit-tests/cond-func.mk
--- a/usr.bin/make/unit-tests/cond-func.mk      Sun Nov 08 21:10:18 2020 +0000
+++ b/usr.bin/make/unit-tests/cond-func.mk      Sun Nov 08 21:33:05 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cond-func.mk,v 1.4 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: cond-func.mk,v 1.5 2020/11/08 21:33:05 rillig Exp $
 #
 # Tests for those parts of the functions in .if conditions that are common
 # among several functions.
@@ -67,5 +67,13 @@
 .  error
 .endif
 
+# The following condition is interpreted as defined(A) && defined(B).
+# In lack of a function call expression, each kind of .if directive has a
+# default function that is called when a bare word is parsed.  For the plain
+# .if directive, this function is defined(); see "struct If ifs" in cond.c.
+.if A&B
+.  error
+.endif
+
 all:
        @:;



Home | Main Index | Thread Index | Old Index