Module Name: src
Committed By: rillig
Date: Sat Aug 15 01:49:07 UTC 2020
Modified Files:
src/usr.bin/make: Makefile
src/usr.bin/make/unit-tests: Makefile archive.mk
Log Message:
make(1): fix archive test
Even though it is commented out in this Makefile, it is still run by
atf, on purpose. This test is broken on FreeBSD, but on NetBSD it
should still be run.
Without removing the archive first, it could be left over from a
previous test failure and thus be newer than all its members, leading to
${.OODATE} being empty.
To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/usr.bin/make/Makefile
cvs rdiff -u -r1.91 -r1.92 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/archive.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/Makefile
diff -u src/usr.bin/make/Makefile:1.88 src/usr.bin/make/Makefile:1.89
--- src/usr.bin/make/Makefile:1.88 Wed Aug 12 19:21:05 2020
+++ src/usr.bin/make/Makefile Sat Aug 15 01:49:07 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.88 2020/08/12 19:21:05 rillig Exp $
+# $NetBSD: Makefile,v 1.89 2020/08/15 01:49:07 rillig Exp $
# @(#)Makefile 5.2 (Berkeley) 12/28/90
PROG= make
@@ -173,7 +173,7 @@ test: .MAKE
sed -i 's,^\([^:]*\): *[0-9]*:,\1: ,' *.gcov
.endif
-accept: .MAKE
+accept sync-mi: .MAKE
cd ${.CURDIR}/unit-tests && ${.MAKE} ${.TARGET}
retest:
Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.91 src/usr.bin/make/unit-tests/Makefile:1.92
--- src/usr.bin/make/unit-tests/Makefile:1.91 Sun Aug 9 16:32:28 2020
+++ src/usr.bin/make/unit-tests/Makefile Sat Aug 15 01:49:07 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.91 2020/08/09 16:32:28 rillig Exp $
+# $NetBSD: Makefile,v 1.92 2020/08/15 01:49:07 rillig Exp $
#
# Unit tests for make(1)
#
@@ -33,7 +33,9 @@
# Each test is in a sub-makefile.
# Keep the list sorted.
-TESTS+= # archive # broken on FreeBSD
+# Any test that is commented out must be ignored in
+# src/tests/usr.bin/make/t_make.sh as well.
+TESTS+= # archive # broken on FreeBSD, enabled in t_make.sh
TESTS+= cmdline
TESTS+= comment
TESTS+= cond-late
Index: src/usr.bin/make/unit-tests/archive.mk
diff -u src/usr.bin/make/unit-tests/archive.mk:1.1 src/usr.bin/make/unit-tests/archive.mk:1.2
--- src/usr.bin/make/unit-tests/archive.mk:1.1 Mon Jul 27 18:51:03 2020
+++ src/usr.bin/make/unit-tests/archive.mk Sat Aug 15 01:49:07 2020
@@ -1,4 +1,4 @@
-# $NetBSD: archive.mk,v 1.1 2020/07/27 18:51:03 rillig Exp $
+# $NetBSD: archive.mk,v 1.2 2020/08/15 01:49:07 rillig Exp $
#
# Very basic demonstration of handling archives, based on the description
# in PSD.doc/tutorial.ms.
@@ -13,6 +13,7 @@ MAKE_CMD= ${.MAKE} -f ${MAKEFILE}
RUN?= @set -eu;
all:
+ ${RUN} ${MAKE_CMD} remove-archive
${RUN} ${MAKE_CMD} create-archive
${RUN} ${MAKE_CMD} list-archive
${RUN} ${MAKE_CMD} depend-on-existing-member
@@ -33,5 +34,5 @@ depend-on-existing-member: ${ARCHIVE}(ar
depend-on-nonexistent-member: ${ARCHIVE}(nonexistent.mk)
${RUN} echo $@
-remove-archive: ${ARCHIVE}
+remove-archive:
rm ${ARCHIVE}