X-Git-Url: https://git.llucax.com/software/posixx.git/blobdiff_plain/2fe0b1743406a2b0d201c973fd370d6838fb1ee7..189a2e19b85a81ae6aa71be3635fc6c1fa0bfeca:/test/Makefile diff --git a/test/Makefile b/test/Makefile index b9ae448..1ae8ddc 100644 --- a/test/Makefile +++ b/test/Makefile @@ -21,7 +21,7 @@ ALL_CFLAGS = $(LOCAL_CFLAGS) $(LI_CFLAGS) $(CFLAGS) ALL_LDFLAGS = $(LOCAL_LDFLAGS) $(LI_LDFLAGS) $(LDFLAGS) ifdef RELEASE -ALL_CFLAGS += -O3 -NDEBUG +ALL_CFLAGS += -O3 -DNDEBUG endif ifdef DEBUG @@ -36,9 +36,9 @@ endif ifneq ($(V), 1) NICE_CXX = @echo " CXX $@"; $(CXX) NICE_LINK = @echo " LINK $@"; $(CXX) -NICE_TEST = @echo " TEST"; $(TESTCMD) > test_suite.log 2>&1 +NICE_TEST = @echo " TEST"; $(TESTCMD) > $(TESTPRG).log 2>&1 NICE_MEMTEST = @echo " MEMTEST"; $(VALGRIND) --log-file=valgrind.log \ - $(TESTCMD) > valgrind.test_suite.log 2>&1 + $(TESTCMD) > valgrind.$(TESTPRG).log 2>&1 NICE_CLEAN = @echo " CLEAN"; $(RM) else NICE_CXX = $(CXX) @@ -51,7 +51,7 @@ endif default: all -all: test_suite +all: $(TESTPRG) # dependency handling @@ -93,16 +93,22 @@ include: @mkdir -p include @ln -fs ../../src include/posixx -test: all +test: .test-stamp + +.test-stamp: $(TESTPRG) $(NICE_TEST) + @touch $@ + +memtest: .memtest-stamp -memtest: all +.memtest-stamp: $(TESTPRG) $(NICE_MEMTEST) + @touch $@ clean: $(NICE_CLEAN) -r $(TESTPRG) include $(OBJS) .deps valgrind.log \ - *.bb *.bbg *.da *.gcov *.gcda *.gcno gmon.out + *.bb *.bbg *.da *.gcov *.gcda *.gcno gmon.out .*-stamp -.PHONY: default all test clean +.PHONY: default all test memtest clean