Module Name:    src
Committed By:   rillig
Date:           Fri Jan 22 00:44:55 UTC 2021

Modified Files:
        src/usr.bin/make/unit-tests: include-main.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/include-main.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/include-main.mk
diff -u src/usr.bin/make/unit-tests/include-main.mk:1.5 src/usr.bin/make/unit-tests/include-main.mk:1.6
--- src/usr.bin/make/unit-tests/include-main.mk:1.5	Sat Sep  5 18:18:05 2020
+++ src/usr.bin/make/unit-tests/include-main.mk	Fri Jan 22 00:44:55 2021
@@ -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})

Reply via email to