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): fix test for .INCLUDEDFROMFILE



details:   https://anonhg.NetBSD.org/src/rev/0d873e2b8294
branches:  trunk
changeset: 950242:0d873e2b8294
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jan 22 00:44:55 2021 +0000

description:
make(1): fix test for .INCLUDEDFROMFILE

The test did not test the intended variable before.

If the implementation of the .INCLUDEDFROMFILE had been wrong before,
the test would have succeeded nevertheless since it tested whether the
variable named "include-main.mk" was defined, which was obviously never
the case since that's the value of the variable, not the name.

diffstat:

 usr.bin/make/unit-tests/include-main.mk |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r dfc3a2a805bf -r 0d873e2b8294 usr.bin/make/unit-tests/include-main.mk
--- a/usr.bin/make/unit-tests/include-main.mk   Fri Jan 22 00:12:01 2021 +0000
+++ b/usr.bin/make/unit-tests/include-main.mk   Fri Jan 22 00:44:55 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: include-main.mk,v 1.5 2020/09/05 18:18:05 rillig Exp $
+# $NetBSD: include-main.mk,v 1.6 2021/01/22 00:44:55 rillig Exp $
 #
 # Until 2020-09-05, the .INCLUDEDFROMFILE magic variable did not behave
 # as described in the manual page.
@@ -17,7 +17,7 @@
 .endif
 
 .for i in once
-.  if !defined(${.INCLUDEDFROMFILE})
+.  if !defined(.INCLUDEDFROMFILE)
 .    info main-before-for-ok
 .  else
 .    warning main-before-for-fail(${.INCLUDEDFROMFILE})
@@ -33,7 +33,7 @@
 .endif
 
 .for i in once
-.  if !defined(${.INCLUDEDFROMFILE})
+.  if !defined(.INCLUDEDFROMFILE)
 .    info main-after-for-ok
 .  else
 .    warning main-after-for-fail(${.INCLUDEDFROMFILE})



Home | Main Index | Thread Index | Old Index