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 tests/make: remove unnecessary condi...



details:   https://anonhg.NetBSD.org/src/rev/df69536664c3
branches:  trunk
changeset: 359836:df69536664c3
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Jan 26 22:19:25 2022 +0000

description:
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.

diffstat:

 usr.bin/make/unit-tests/depsrc-meta.mk |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r cb594080dc11 -r df69536664c3 usr.bin/make/unit-tests/depsrc-meta.mk
--- a/usr.bin/make/unit-tests/depsrc-meta.mk    Wed Jan 26 20:22:14 2022 +0000
+++ b/usr.bin/make/unit-tests/depsrc-meta.mk    Wed Jan 26 22:19:25 2022 +0000
@@ -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
 
+.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



Home | Main Index | Thread Index | Old Index