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): add tests for the special ....



details:   https://anonhg.NetBSD.org/src/rev/be0298700804
branches:  trunk
changeset: 943152:be0298700804
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Aug 28 03:51:06 2020 +0000

description:
make(1): add tests for the special .INCLUDES and .LIBS variables

diffstat:

 distrib/sets/lists/tests/mi                      |   6 +++++-
 usr.bin/make/unit-tests/Makefile                 |   4 +++-
 usr.bin/make/unit-tests/varname-dot-includes.exp |   2 ++
 usr.bin/make/unit-tests/varname-dot-includes.mk  |  20 ++++++++++++++++++++
 usr.bin/make/unit-tests/varname-dot-libs.exp     |   2 ++
 usr.bin/make/unit-tests/varname-dot-libs.mk      |  20 ++++++++++++++++++++
 6 files changed, 52 insertions(+), 2 deletions(-)

diffs (104 lines):

diff -r fa04611d2617 -r be0298700804 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Fri Aug 28 03:35:45 2020 +0000
+++ b/distrib/sets/lists/tests/mi       Fri Aug 28 03:51:06 2020 +0000
@@ -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
diff -r fa04611d2617 -r be0298700804 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Fri Aug 28 03:35:45 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Fri Aug 28 03:51:06 2020 +0000
@@ -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
diff -r fa04611d2617 -r be0298700804 usr.bin/make/unit-tests/varname-dot-includes.exp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/varname-dot-includes.exp  Fri Aug 28 03:51:06 2020 +0000
@@ -0,0 +1,2 @@
+.INCLUDES= -I. -I..
+exit status 0
diff -r fa04611d2617 -r be0298700804 usr.bin/make/unit-tests/varname-dot-includes.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/varname-dot-includes.mk   Fri Aug 28 03:51:06 2020 +0000
@@ -0,0 +1,20 @@
+# $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}
diff -r fa04611d2617 -r be0298700804 usr.bin/make/unit-tests/varname-dot-libs.exp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/varname-dot-libs.exp      Fri Aug 28 03:51:06 2020 +0000
@@ -0,0 +1,2 @@
+.LIBS= -L. -L..
+exit status 0
diff -r fa04611d2617 -r be0298700804 usr.bin/make/unit-tests/varname-dot-libs.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/varname-dot-libs.mk       Fri Aug 28 03:51:06 2020 +0000
@@ -0,0 +1,20 @@
+# $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}



Home | Main Index | Thread Index | Old Index