Module Name:    src
Committed By:   rillig
Date:           Wed Dec  1 23:56:29 UTC 2021

Modified Files:
        src/usr.bin/make/unit-tests: deptgt-default.mk

Log Message:
tests/make: test target '.DEFAULT'


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-default.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/deptgt-default.mk
diff -u src/usr.bin/make/unit-tests/deptgt-default.mk:1.2 src/usr.bin/make/unit-tests/deptgt-default.mk:1.3
--- src/usr.bin/make/unit-tests/deptgt-default.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/deptgt-default.mk	Wed Dec  1 23:56:29 2021
@@ -1,8 +1,17 @@
-# $NetBSD: deptgt-default.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: deptgt-default.mk,v 1.3 2021/12/01 23:56:29 rillig Exp $
 #
-# Tests for the special target .DEFAULT in dependency declarations.
+# Tests for the special target .DEFAULT in dependency declarations, which
+# attaches its associated commands to all targets that don't specify any way
+# to create them.
 
-# TODO: Implementation
+all: test-default not-a-target
+
+test-default: .PHONY
+
+has-commands: .PHONY
+	@echo 'Making ${.TARGET} from ${.IMPSRC}.'
+
+.DEFAULT: dependency-is-ignored
+	@echo "Default command is making '${.TARGET}' from '${.IMPSRC}'."
 
 all:
-	@:;

Reply via email to