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 unified 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,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: mi,v 1.910 2020/08/27 19:00:17 rillig Exp $ 1# $NetBSD: mi,v 1.911 2020/08/28 03:51:06 rillig Exp $
2# 2#
3# Note: don't delete entries from here - mark them as "obsolete" instead. 3# Note: don't delete entries from here - mark them as "obsolete" instead.
4# 4#
5./etc/mtree/set.tests tests-sys-root 5./etc/mtree/set.tests tests-sys-root
6./usr/libdata/debug/usr/tests tests-base-debug compattestdir 6./usr/libdata/debug/usr/tests tests-base-debug compattestdir
7./usr/libdata/debug/usr/tests/atf tests-atf-debug compattestfile,atf 7./usr/libdata/debug/usr/tests/atf tests-atf-debug compattestfile,atf
8./usr/libdata/debug/usr/tests/atf/atf-c tests-atf-debug compattestfile,atf 8./usr/libdata/debug/usr/tests/atf/atf-c tests-atf-debug compattestfile,atf
9./usr/libdata/debug/usr/tests/atf/atf-c++ tests-atf-debug compattestfile,atf 9./usr/libdata/debug/usr/tests/atf/atf-c++ tests-atf-debug compattestfile,atf
10./usr/libdata/debug/usr/tests/atf/atf-c++/detail tests-atf-debug compattestfile,atf 10./usr/libdata/debug/usr/tests/atf/atf-c++/detail tests-atf-debug compattestfile,atf
11./usr/libdata/debug/usr/tests/atf/atf-c/detail tests-atf-debug compattestfile,atf 11./usr/libdata/debug/usr/tests/atf/atf-c/detail tests-atf-debug compattestfile,atf
12./usr/libdata/debug/usr/tests/atf/atf-compile tests-obsolete obsolete 12./usr/libdata/debug/usr/tests/atf/atf-compile tests-obsolete obsolete
13./usr/libdata/debug/usr/tests/atf/atf-report tests-obsolete obsolete 13./usr/libdata/debug/usr/tests/atf/atf-report tests-obsolete obsolete
14./usr/libdata/debug/usr/tests/atf/atf-run tests-obsolete obsolete 14./usr/libdata/debug/usr/tests/atf/atf-run tests-obsolete obsolete
@@ -5004,30 +5004,34 @@ @@ -5004,30 +5004,34 @@
5004./usr/tests/usr.bin/make/unit-tests/varmod-to-upper.mk tests-usr.bin-tests compattestfile,atf 5004./usr/tests/usr.bin/make/unit-tests/varmod-to-upper.mk tests-usr.bin-tests compattestfile,atf
5005./usr/tests/usr.bin/make/unit-tests/varmod-undefined.exp tests-usr.bin-tests compattestfile,atf 5005./usr/tests/usr.bin/make/unit-tests/varmod-undefined.exp tests-usr.bin-tests compattestfile,atf
5006./usr/tests/usr.bin/make/unit-tests/varmod-undefined.mk tests-usr.bin-tests compattestfile,atf 5006./usr/tests/usr.bin/make/unit-tests/varmod-undefined.mk tests-usr.bin-tests compattestfile,atf
5007./usr/tests/usr.bin/make/unit-tests/varmod-unique.exp tests-usr.bin-tests compattestfile,atf 5007./usr/tests/usr.bin/make/unit-tests/varmod-unique.exp tests-usr.bin-tests compattestfile,atf
5008./usr/tests/usr.bin/make/unit-tests/varmod-unique.mk tests-usr.bin-tests compattestfile,atf 5008./usr/tests/usr.bin/make/unit-tests/varmod-unique.mk tests-usr.bin-tests compattestfile,atf
5009./usr/tests/usr.bin/make/unit-tests/varmod.exp tests-usr.bin-tests compattestfile,atf 5009./usr/tests/usr.bin/make/unit-tests/varmod.exp tests-usr.bin-tests compattestfile,atf
5010./usr/tests/usr.bin/make/unit-tests/varmod.mk tests-usr.bin-tests compattestfile,atf 5010./usr/tests/usr.bin/make/unit-tests/varmod.mk tests-usr.bin-tests compattestfile,atf
5011./usr/tests/usr.bin/make/unit-tests/varname-dollar.exp tests-usr.bin-tests compattestfile,atf 5011./usr/tests/usr.bin/make/unit-tests/varname-dollar.exp tests-usr.bin-tests compattestfile,atf
5012./usr/tests/usr.bin/make/unit-tests/varname-dollar.mk tests-usr.bin-tests compattestfile,atf 5012./usr/tests/usr.bin/make/unit-tests/varname-dollar.mk tests-usr.bin-tests compattestfile,atf
5013./usr/tests/usr.bin/make/unit-tests/varname-dot-alltargets.exp tests-usr.bin-tests compattestfile,atf 5013./usr/tests/usr.bin/make/unit-tests/varname-dot-alltargets.exp tests-usr.bin-tests compattestfile,atf
5014./usr/tests/usr.bin/make/unit-tests/varname-dot-alltargets.mk tests-usr.bin-tests compattestfile,atf 5014./usr/tests/usr.bin/make/unit-tests/varname-dot-alltargets.mk tests-usr.bin-tests compattestfile,atf
5015./usr/tests/usr.bin/make/unit-tests/varname-dot-curdir.exp tests-usr.bin-tests compattestfile,atf 5015./usr/tests/usr.bin/make/unit-tests/varname-dot-curdir.exp tests-usr.bin-tests compattestfile,atf
5016./usr/tests/usr.bin/make/unit-tests/varname-dot-curdir.mk tests-usr.bin-tests compattestfile,atf 5016./usr/tests/usr.bin/make/unit-tests/varname-dot-curdir.mk tests-usr.bin-tests compattestfile,atf
 5017./usr/tests/usr.bin/make/unit-tests/varname-dot-includes.exp tests-usr.bin-tests compattestfile,atf
 5018./usr/tests/usr.bin/make/unit-tests/varname-dot-includes.mk tests-usr.bin-tests compattestfile,atf
5017./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromdir.exp tests-usr.bin-tests compattestfile,atf 5019./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromdir.exp tests-usr.bin-tests compattestfile,atf
5018./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromdir.mk tests-usr.bin-tests compattestfile,atf 5020./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromdir.mk tests-usr.bin-tests compattestfile,atf
5019./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromfile.exp tests-usr.bin-tests compattestfile,atf 5021./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromfile.exp tests-usr.bin-tests compattestfile,atf
5020./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromfile.mk tests-usr.bin-tests compattestfile,atf 5022./usr/tests/usr.bin/make/unit-tests/varname-dot-includedfromfile.mk tests-usr.bin-tests compattestfile,atf
 5023./usr/tests/usr.bin/make/unit-tests/varname-dot-libs.exp tests-usr.bin-tests compattestfile,atf
 5024./usr/tests/usr.bin/make/unit-tests/varname-dot-libs.mk tests-usr.bin-tests compattestfile,atf
5021./usr/tests/usr.bin/make/unit-tests/varname-dot-make-dependfile.exp tests-usr.bin-tests compattestfile,atf 5025./usr/tests/usr.bin/make/unit-tests/varname-dot-make-dependfile.exp tests-usr.bin-tests compattestfile,atf
5022./usr/tests/usr.bin/make/unit-tests/varname-dot-make-dependfile.mk tests-usr.bin-tests compattestfile,atf 5026./usr/tests/usr.bin/make/unit-tests/varname-dot-make-dependfile.mk tests-usr.bin-tests compattestfile,atf
5023./usr/tests/usr.bin/make/unit-tests/varname-dot-make-expand_variables.exp tests-usr.bin-tests compattestfile,atf 5027./usr/tests/usr.bin/make/unit-tests/varname-dot-make-expand_variables.exp tests-usr.bin-tests compattestfile,atf
5024./usr/tests/usr.bin/make/unit-tests/varname-dot-make-expand_variables.mk tests-usr.bin-tests compattestfile,atf 5028./usr/tests/usr.bin/make/unit-tests/varname-dot-make-expand_variables.mk tests-usr.bin-tests compattestfile,atf
5025./usr/tests/usr.bin/make/unit-tests/varname-dot-make-exported.exp tests-usr.bin-tests compattestfile,atf 5029./usr/tests/usr.bin/make/unit-tests/varname-dot-make-exported.exp tests-usr.bin-tests compattestfile,atf
5026./usr/tests/usr.bin/make/unit-tests/varname-dot-make-exported.mk tests-usr.bin-tests compattestfile,atf 5030./usr/tests/usr.bin/make/unit-tests/varname-dot-make-exported.mk tests-usr.bin-tests compattestfile,atf
5027./usr/tests/usr.bin/make/unit-tests/varname-dot-make-jobs-prefix.exp tests-usr.bin-tests compattestfile,atf 5031./usr/tests/usr.bin/make/unit-tests/varname-dot-make-jobs-prefix.exp tests-usr.bin-tests compattestfile,atf
5028./usr/tests/usr.bin/make/unit-tests/varname-dot-make-jobs-prefix.mk tests-usr.bin-tests compattestfile,atf 5032./usr/tests/usr.bin/make/unit-tests/varname-dot-make-jobs-prefix.mk tests-usr.bin-tests compattestfile,atf
5029./usr/tests/usr.bin/make/unit-tests/varname-dot-make-jobs.exp tests-usr.bin-tests compattestfile,atf 5033./usr/tests/usr.bin/make/unit-tests/varname-dot-make-jobs.exp tests-usr.bin-tests compattestfile,atf
5030./usr/tests/usr.bin/make/unit-tests/varname-dot-make-jobs.mk tests-usr.bin-tests compattestfile,atf 5034./usr/tests/usr.bin/make/unit-tests/varname-dot-make-jobs.mk tests-usr.bin-tests compattestfile,atf
5031./usr/tests/usr.bin/make/unit-tests/varname-dot-make-level.exp tests-usr.bin-tests compattestfile,atf 5035./usr/tests/usr.bin/make/unit-tests/varname-dot-make-level.exp tests-usr.bin-tests compattestfile,atf
5032./usr/tests/usr.bin/make/unit-tests/varname-dot-make-level.mk tests-usr.bin-tests compattestfile,atf 5036./usr/tests/usr.bin/make/unit-tests/varname-dot-make-level.mk tests-usr.bin-tests compattestfile,atf
5033./usr/tests/usr.bin/make/unit-tests/varname-dot-make-makefile_preference.exp tests-usr.bin-tests compattestfile,atf 5037./usr/tests/usr.bin/make/unit-tests/varname-dot-make-makefile_preference.exp tests-usr.bin-tests compattestfile,atf

cvs diff -r1.121 -r1.122 src/usr.bin/make/unit-tests/Makefile (expand / switch to unified 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,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.121 2020/08/28 02:45:51 rillig Exp $ 1# $NetBSD: Makefile,v 1.122 2020/08/28 03:51:06 rillig Exp $
2# 2#
3# Unit tests for make(1) 3# Unit tests for make(1)
4# 4#
5# The main targets are: 5# The main targets are:
6# 6#
7# all: 7# all:
8# run all the tests 8# run all the tests
9# test: 9# test:
10# run 'all', and compare to expected results 10# run 'all', and compare to expected results
11# accept: 11# accept:
12# move generated output to expected results 12# move generated output to expected results
13# 13#
14# Settable variables 14# Settable variables
@@ -262,28 +262,30 @@ TESTS+= varmod-sysv @@ -262,28 +262,30 @@ TESTS+= varmod-sysv
262TESTS+= varmod-tail 262TESTS+= varmod-tail
263TESTS+= varmod-to-abs 263TESTS+= varmod-to-abs
264TESTS+= varmod-to-lower 264TESTS+= varmod-to-lower
265TESTS+= varmod-to-many-words 265TESTS+= varmod-to-many-words
266TESTS+= varmod-to-one-word 266TESTS+= varmod-to-one-word
267TESTS+= varmod-to-separator 267TESTS+= varmod-to-separator
268TESTS+= varmod-to-upper 268TESTS+= varmod-to-upper
269TESTS+= varmod-undefined 269TESTS+= varmod-undefined
270TESTS+= varmod-unique 270TESTS+= varmod-unique
271TESTS+= varname 271TESTS+= varname
272TESTS+= varname-dollar 272TESTS+= varname-dollar
273TESTS+= varname-dot-alltargets 273TESTS+= varname-dot-alltargets
274TESTS+= varname-dot-curdir 274TESTS+= varname-dot-curdir
 275TESTS+= varname-dot-includes
275TESTS+= varname-dot-includedfromdir 276TESTS+= varname-dot-includedfromdir
276TESTS+= varname-dot-includedfromfile 277TESTS+= varname-dot-includedfromfile
 278TESTS+= varname-dot-libs
277TESTS+= varname-dot-make-dependfile 279TESTS+= varname-dot-make-dependfile
278TESTS+= varname-dot-make-expand_variables 280TESTS+= varname-dot-make-expand_variables
279TESTS+= varname-dot-make-exported 281TESTS+= varname-dot-make-exported
280TESTS+= varname-dot-make-jobs 282TESTS+= varname-dot-make-jobs
281TESTS+= varname-dot-make-jobs-prefix 283TESTS+= varname-dot-make-jobs-prefix
282TESTS+= varname-dot-make-level 284TESTS+= varname-dot-make-level
283TESTS+= varname-dot-make-makefile_preference 285TESTS+= varname-dot-make-makefile_preference
284TESTS+= varname-dot-make-makefiles 286TESTS+= varname-dot-make-makefiles
285TESTS+= varname-dot-make-meta-bailiwick 287TESTS+= varname-dot-make-meta-bailiwick
286TESTS+= varname-dot-make-meta-created 288TESTS+= varname-dot-make-meta-created
287TESTS+= varname-dot-make-meta-files 289TESTS+= varname-dot-make-meta-files
288TESTS+= varname-dot-make-meta-ignore_filter 290TESTS+= varname-dot-make-meta-ignore_filter
289TESTS+= varname-dot-make-meta-ignore_paths 291TESTS+= varname-dot-make-meta-ignore_paths

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}