Fri Aug 28 03:51:06 2020 UTC ()
make(1): add tests for the special .INCLUDES and .LIBS variables


(rillig)
diff -r1.910 -r1.911 src/distrib/sets/lists/tests/mi
diff -r1.121 -r1.122 src/usr.bin/make/unit-tests/Makefile
diff -r0 -r1.1 src/usr.bin/make/unit-tests/varname-dot-includes.exp
diff -r0 -r1.1 src/usr.bin/make/unit-tests/varname-dot-includes.mk
diff -r0 -r1.1 src/usr.bin/make/unit-tests/varname-dot-libs.exp
diff -r0 -r1.1 src/usr.bin/make/unit-tests/varname-dot-libs.mk

cvs diff -r1.910 -r1.911 src/distrib/sets/lists/tests/mi (expand / switch to context diff)
--- src/distrib/sets/lists/tests/mi 2020/08/27 19:00:17 1.910
+++ src/distrib/sets/lists/tests/mi 2020/08/28 03:51:06 1.911
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.910 2020/08/27 19:00:17 rillig Exp $
+# $NetBSD: mi,v 1.911 2020/08/28 03:51:06 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5014,10 +5014,14 @@
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-alltargets.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-curdir.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-curdir.mk	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varname-dot-includes.exp	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varname-dot-includes.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromdir.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromdir.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromfile.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromfile.mk	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varname-dot-libs.exp	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varname-dot-libs.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-make-dependfile.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-make-dependfile.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varname-dot-make-expand_variables.exp	tests-usr.bin-tests	compattestfile,atf

cvs diff -r1.121 -r1.122 src/usr.bin/make/unit-tests/Makefile (expand / switch to context diff)
--- src/usr.bin/make/unit-tests/Makefile 2020/08/28 02:45:51 1.121
+++ src/usr.bin/make/unit-tests/Makefile 2020/08/28 03:51:06 1.122
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.121 2020/08/28 02:45:51 rillig Exp $
+# $NetBSD: Makefile,v 1.122 2020/08/28 03:51:06 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -272,8 +272,10 @@
 TESTS+=		varname-dollar
 TESTS+=		varname-dot-alltargets
 TESTS+=		varname-dot-curdir
+TESTS+=		varname-dot-includes
 TESTS+=		varname-dot-includedfromdir
 TESTS+=		varname-dot-includedfromfile
+TESTS+=		varname-dot-libs
 TESTS+=		varname-dot-make-dependfile
 TESTS+=		varname-dot-make-expand_variables
 TESTS+=		varname-dot-make-exported

File Added: src/usr.bin/make/unit-tests/varname-dot-includes.exp
.INCLUDES= -I. -I..
exit status 0

File Added: src/usr.bin/make/unit-tests/varname-dot-includes.mk
# $NetBSD: varname-dot-includes.mk,v 1.1 2020/08/28 03:51:06 rillig Exp $
#
# Tests for the special .INCLUDES variable, which is not documented in the
# manual page.
#
# It is yet unclear in which situations this feature is useful.

.SUFFIXES: .h

.PATH.h: . ..

.INCLUDES: .h

# The .INCLUDES variable is not yet available.
.if defined(${.INCLUDES:Q})
.error
.endif

all:
	@echo .INCLUDES=${.INCLUDES:Q}

File Added: src/usr.bin/make/unit-tests/varname-dot-libs.exp
.LIBS= -L. -L..
exit status 0

File Added: src/usr.bin/make/unit-tests/varname-dot-libs.mk
# $NetBSD: varname-dot-libs.mk,v 1.1 2020/08/28 03:51:06 rillig Exp $
#
# Tests for the special .LIBS variable, which is not documented in the
# manual page.
#
# It is yet unclear in which situations this feature is useful.

.SUFFIXES: .a

.PATH.a: . ..

.LIBS: .a

# The .LIBS variable is not yet available.
.if defined(${.LIBS:Q})
.error
.endif

all:
	@echo .LIBS=${.LIBS:Q}