From 17102922e7bb3f5ae816a1cfb25e0fdc367392e5 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 4 Dec 2014 07:57:48 -0800 Subject: * Makefile (clean): add tests.clean as prerequisite. (tests): Add tests.clean as prerequiste, remove rm command. (retest, tests.clean): New rules. --- ChangeLog | 6 ++++++ Makefile | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e90b7a24..fce1b1ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-12-04 Kaz Kylheku + + * Makefile (clean): add tests.clean as prerequisite. + (tests): Add tests.clean as prerequiste, remove rm command. + (retest, tests.clean): New rules. + 2014-12-04 Kaz Kylheku * Makefile (tests/009/json.out): Use eager assignment diff --git a/Makefile b/Makefile index 28bdb744..23e13c79 100644 --- a/Makefile +++ b/Makefile @@ -96,9 +96,9 @@ $(MPI_OBJS): CFLAGS += -DXCALLOC=chk_calloc -DXFREE=free rebuild: clean repatch $(PROG) .PHONY: clean -clean: conftest.clean +clean: conftest.clean tests.clean rm -f $(PROG)$(EXE) $(OBJS) $(OBJS-y) \ - y.tab.c lex.yy.c y.tab.h y.output $(TESTS_OUT) $(TESTS_OK) + y.tab.c lex.yy.c y.tab.h y.output .PHONY: repatch repatch: @@ -121,10 +121,12 @@ TESTS_OK := $(TESTS_OUT:.out=.ok) $(TESTS_OK): $(PROG) .PHONY: tests -tests: $(TESTS_OK) - @rm -f $(TESTS_OUT) $(TESTS_OK) +tests: $(TESTS_OK) tests.clean @echo "** tests passed!" +.PHONY: retest +retest: tests.clean tests + tests/001/%: TXR_ARGS := $(top_srcdir)/tests/001/data tests/001/query-1.out: TXR_OPTS := -B tests/001/query-2.out: TXR_OPTS := -B @@ -165,6 +167,10 @@ tests/011/%: TXR_DBG_OPTS := %.expected: %.out cp $< $@ +.PHONY: tests.clean +tests.clean: + @rm -f $(TESTS_OUT) $(TESTS_OK) + define GREP_CHECK @if [ $$(grep -E $(1) $(SRCS) | wc -l) -ne $(3) ] ; then \ echo "New '$(2)' occurrences have been found:" ; \ -- cgit v1.2.3