Module Name: src
Committed By: rillig
Date: Thu Oct 8 19:09:08 UTC 2020
Modified Files:
src/distrib/sets/lists/tests: mi
src/usr.bin/make/unit-tests: varname-dot-curdir.mk
Removed Files:
src/usr.bin/make/unit-tests: misc.exp misc.mk
Log Message:
make(1): move test for .CURDIR from misc.mk to varname-dot-curname.mk
To generate a diff of this commit:
cvs rdiff -u -r1.938 -r1.939 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.1 -r0 src/usr.bin/make/unit-tests/misc.exp \
src/usr.bin/make/unit-tests/misc.mk
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varname-dot-curdir.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.938 src/distrib/sets/lists/tests/mi:1.939
--- src/distrib/sets/lists/tests/mi:1.938 Sun Oct 4 06:53:15 2020
+++ src/distrib/sets/lists/tests/mi Thu Oct 8 19:09:08 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.938 2020/10/04 06:53:15 rillig Exp $
+# $NetBSD: mi,v 1.939 2020/10/08 19:09:08 rillig Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -4829,8 +4829,8 @@
./usr/tests/usr.bin/make/unit-tests/lint.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/make-exported.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/make-exported.mk tests-usr.bin-tests compattestfile,atf
-./usr/tests/usr.bin/make/unit-tests/misc.exp tests-usr.bin-tests compattestfile,atf
-./usr/tests/usr.bin/make/unit-tests/misc.mk tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/misc.exp tests-obsolete obsolete
+./usr/tests/usr.bin/make/unit-tests/misc.mk tests-obsolete obsolete
./usr/tests/usr.bin/make/unit-tests/moderrs.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/moderrs.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/modmatch.exp tests-usr.bin-tests compattestfile,atf
Index: src/usr.bin/make/unit-tests/varname-dot-curdir.mk
diff -u src/usr.bin/make/unit-tests/varname-dot-curdir.mk:1.6 src/usr.bin/make/unit-tests/varname-dot-curdir.mk:1.7
--- src/usr.bin/make/unit-tests/varname-dot-curdir.mk:1.6 Mon Oct 5 19:27:48 2020
+++ src/usr.bin/make/unit-tests/varname-dot-curdir.mk Thu Oct 8 19:09:08 2020
@@ -1,8 +1,26 @@
-# $NetBSD: varname-dot-curdir.mk,v 1.6 2020/10/05 19:27:48 rillig Exp $
+# $NetBSD: varname-dot-curdir.mk,v 1.7 2020/10/08 19:09:08 rillig Exp $
#
-# Tests for the special .CURDIR variable.
+# Tests for the special .CURDIR variable, which is initially set to the
+# canonical path of the current working directory, when make started.
-# TODO: Implementation
+# In all normal situations, the current directory exists, and its name can
+# be resolved. If not, make fails at startup.
+#
+# It would be possible on some systems to remove the current directory, even
+# while a process runs in it, but this is so unrealistic that it's no worth
+# testing.
+.if !exists(${.CURDIR})
+. error
+.endif
+.if !exists(${.CURDIR}/)
+. error
+.endif
+.if !exists(${.CURDIR}/.)
+. error
+.endif
+.if !exists(${.CURDIR}/..)
+. error
+.endif
# Until 2020-10-04, assigning the result of a shell assignment to .CURDIR
# tried to add the shell command ("echo /") to the .PATH instead of the