diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-12-04 07:57:48 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-12-04 07:57:48 -0800 |
commit | 17102922e7bb3f5ae816a1cfb25e0fdc367392e5 (patch) | |
tree | b857c7a68956b7eb13b940e4b8d0b308ef29ee26 /Makefile | |
parent | f328b8112d08d6882b300440d591cde9d40383a6 (diff) | |
download | txr-17102922e7bb3f5ae816a1cfb25e0fdc367392e5.tar.gz txr-17102922e7bb3f5ae816a1cfb25e0fdc367392e5.tar.bz2 txr-17102922e7bb3f5ae816a1cfb25e0fdc367392e5.zip |
* Makefile (clean): add tests.clean as prerequisite.
(tests): Add tests.clean as prerequiste, remove rm command.
(retest, tests.clean): New rules.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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:" ; \ |