aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/opt-where-am-i.mk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/unit-tests/opt-where-am-i.mk')
-rw-r--r--contrib/bmake/unit-tests/opt-where-am-i.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/contrib/bmake/unit-tests/opt-where-am-i.mk b/contrib/bmake/unit-tests/opt-where-am-i.mk
index 9158a598174c..f1eeca920a32 100644
--- a/contrib/bmake/unit-tests/opt-where-am-i.mk
+++ b/contrib/bmake/unit-tests/opt-where-am-i.mk
@@ -1,8 +1,14 @@
-# $NetBSD: opt-where-am-i.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: opt-where-am-i.mk,v 1.4 2022/01/27 02:24:46 sjg Exp $
#
-# Tests for the -w command line option.
+# Tests for the -w command line option, which outputs the current directory
+# at the beginning and end of running make. This is useful when building
+# large source trees that involve several nested make calls.
-# TODO: Implementation
+# The first "Entering directory" is missing since the below .MAKEFLAGS comes
+# too late for it.
+.MAKEFLAGS: -w
all:
- @:;
+.if ${.CURDIR} != "/"
+ @MAKE_OBJDIR_CHECK_WRITABLE=no ${MAKE} -r -f ${MAKEFILE:tA} -C /
+.endif