Module Name: src
Committed By: rillig
Date: Wed Jan 26 22:19:25 UTC 2022
Modified Files:
src/usr.bin/make/unit-tests: depsrc-meta.mk
Log Message:
tests/make: remove unnecessary conditional processing for meta test
The .if/.else distracted from the main topic of the test and made it too
hard to see the main targets.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/depsrc-meta.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/depsrc-meta.mk
diff -u src/usr.bin/make/unit-tests/depsrc-meta.mk:1.4 src/usr.bin/make/unit-tests/depsrc-meta.mk:1.5
--- src/usr.bin/make/unit-tests/depsrc-meta.mk:1.4 Fri Nov 27 08:39:07 2020
+++ src/usr.bin/make/unit-tests/depsrc-meta.mk Wed Jan 26 22:19:25 2022
@@ -1,31 +1,27 @@
-# $NetBSD: depsrc-meta.mk,v 1.4 2020/11/27 08:39:07 rillig Exp $
+# $NetBSD: depsrc-meta.mk,v 1.5 2022/01/26 22:19:25 rillig Exp $
#
# Tests for the special source .META in dependency declarations.
# TODO: Implementation
# TODO: Explanation
-.if make(actual-test)
+.MAIN: all
+.if make(actual-test)
.MAKEFLAGS: -dM
.MAKE.MODE= meta curDirOk=true
+.endif
actual-test: depsrc-meta-target
depsrc-meta-target: .META
@> ${.TARGET}-file
@rm -f ${.TARGET}-file
-.elif make(check-results)
-
check-results:
@echo 'Targets from meta mode:'
@awk '/^TARGET/ { print "| " $$0 }' depsrc-meta-target.meta
@rm depsrc-meta-target.meta
-.else
-
all:
@${MAKE} -f ${MAKEFILE} actual-test
@${MAKE} -f ${MAKEFILE} check-results
-
-.endif