Module Name: src
Committed By: rillig
Date: Mon Nov 2 20:19:33 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: Makefile
Log Message:
make(1): handle errors when sync-mi fails because of a syntax error
To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/usr.bin/make/unit-tests/Makefile
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/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.181 src/usr.bin/make/unit-tests/Makefile:1.182
--- src/usr.bin/make/unit-tests/Makefile:1.181 Sun Nov 1 19:02:22 2020
+++ src/usr.bin/make/unit-tests/Makefile Mon Nov 2 20:19:33 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.181 2020/11/01 19:02:22 rillig Exp $
+# $NetBSD: Makefile,v 1.182 2020/11/02 20:19:33 rillig Exp $
#
# Unit tests for make(1)
#
@@ -544,8 +544,11 @@ sync-mi:
cvs update "$$mi"; \
testsdir="usr.bin/make/unit-tests"; \
fmt="./usr/tests/$$testsdir/%s\ttests-usr.bin-tests\tcompattestfile,atf\\n"; \
- (cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi"; \
- distrib/sets/fmt-list "$$mi"; \
+ cat "$$mi" > "$$mi.tmp"; \
+ (cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi.tmp"; \
+ distrib/sets/fmt-list "$$mi.tmp"; \
+ echo $$?; \
+ mv "$$mi.tmp" "$$mi"; \
cvs diff "$$mi" || true
.if exists(${TEST_MAKE})