diff --git a/Makefile b/Makefile index 3ae466f..02d3625 100644 --- a/Makefile +++ b/Makefile @@ -349,6 +349,9 @@ test: tests2.%: $(MAKE) -C tests/tests2 $@ +testspp.%: + $(MAKE) -C tests/pp $@ + clean: rm -f tcc$(EXESUF) tcc_p$(EXESUF) *-tcc$(EXESUF) tcc.pod rm -f *~ *.o *.a *.so* *.out *.log lib*.def *.exe *.dll a.out tags TAGS @@ -394,6 +397,8 @@ help: @echo "" @echo "make tests2.all / make tests2.37 / make tests2.37+" @echo " run all/single test(s) from tests2, optionally update .expect" + @echo "make testspp.all / make testspp.17" + @echo " run all/single test(s) from tests/pp" @echo "" @echo "Other supported make targets:" @echo " install install-strip tags ETAGS tar clean distclean help" diff --git a/tests/pp/Makefile b/tests/pp/Makefile index 687aa52..4785db3 100644 --- a/tests/pp/Makefile +++ b/tests/pp/Makefile @@ -10,7 +10,7 @@ VPATH = $(SRC) files = $(patsubst %.$1,%.test,$(notdir $(wildcard $(SRC)/*.$1))) TESTS = $(call files,c) $(call files,S) -all test : $(sort $(TESTS)) +all test testspp.all: $(sort $(TESTS)) DIFF_OPTS = -Nu -b -B @@ -29,6 +29,8 @@ FILTER = 2>&1 | sed 's,$(SRC)/,,g' diff $(DIFF_OPTS) $(SRC)/$*.expect $*.output \ && rm -f $*.output +testspp.%: %.test ; + # automatically generate .expect files with gcc: %.expect: # %.c gcc -E -P $*.[cS] >$*.expect 2>&1