From 243d87070609e751a4083c9dc2058649b0c9238f Mon Sep 17 00:00:00 2001 From: Ralf Jung <jung@mpi-sws.org> Date: Wed, 12 Jun 2019 15:39:18 +0200 Subject: [PATCH] move comments out-of-line to please the extremely picky macOS shell --- Makefile.coq.local | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile.coq.local b/Makefile.coq.local index 2693cbb8c..182c618ac 100644 --- a/Makefile.coq.local +++ b/Makefile.coq.local @@ -17,6 +17,13 @@ tests/.coqdeps.d: $(TESTFILES) $(HIDE)$(COQDEP) -dyndep var $(COQMF_COQLIBS_NOML) $^ $(redir_if_ok) -include tests/.coqdeps.d +# Main test script (comments out-of-line because macOS otherwise barfs?!?) +# - Determine reference file (`REF`). +# - Print user-visible status line. +# - Dump Coq output into a temporary file. +# - Run `sed -i` on that file in a way that works on macOS. +# - Either compare the result with the reference file, or move it over the reference file. +# - Cleanup, and mark as done for make. $(TESTFILES:.v=.vo): %.vo: %.v $(if $(MAKE_REF),,%.ref) $(NORMALIZER) $(HIDE)TEST="$$(basename -s .v $<)" && \ if test -f "tests/$$TEST.$(COQ_MINOR_VERSION).ref"; then \ @@ -25,16 +32,12 @@ $(TESTFILES:.v=.vo): %.vo: %.v $(if $(MAKE_REF),,%.ref) $(NORMALIZER) REF="tests/$$TEST.ref"; \ fi && \ echo "COQTEST$(if $(COQ_OLD), [no ref],$(if $(MAKE_REF), [make ref],)) $<$(if $(COQ_OLD),, (ref: $$REF))" && \ - # Dump Coq output into temporary file. \ TMPFILE="$$(mktemp)" && \ $(TIMER) $(COQ_TEST) $(COQFLAGS) $(COQLIBS) -load-vernac-source $< > "$$TMPFILE" && \ - # `sed -i` in a way that also works on macOS. \ sed -f $(NORMALIZER) "$$TMPFILE" > "$$TMPFILE".new && \ mv "$$TMPFILE".new "$$TMPFILE" && \ - # Either compare temporary file with reffile or move it there. \ $(if $(COQ_OLD),true, \ $(if $(MAKE_REF),mv "$$TMPFILE" "$$REF",diff -u "$$REF" "$$TMPFILE") \ ) && \ - # Cleanup, and mark as done for make. \ rm -f "$$TMPFILE" && \ touch $@ -- GitLab