From fb4d0d4df9002490458476fc8c720ece2d8620c5 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 10 Aug 2016 06:55:55 +0200 Subject: [PATCH] added namespace test --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 765f93f..d87da54 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ test-xxhsum-c: xxhsum echo "00000000 test-expects-file-not-found" | ./xxhsum -c -; test $$? -eq 1 clean-xxhsum-c: - @rm -f .test.xxh32 .test.xxh64 + @$(RM) -f .test.xxh32 .test.xxh64 armtest: clean @echo ---- test ARM compilation ---- @@ -125,19 +125,25 @@ staticAnalyze: clean @echo ---- static analyzer - scan-build ---- CFLAGS="-g -Werror" scan-build --status-bugs -v $(MAKE) all +namespaceTest: + $(CC) -c xxhash.c + $(CC) -DXXH_NAMESPACE=TEST_ -c xxhash.c -o xxhash2.o + $(CC) xxhash.o xxhash2.o xxhsum.c -o xxhsum2 # will fail if one namespace missing (symbol collision) + $(RM) *.o xxhsum2 # clean + xxhsum.1: xxhsum.1.md cat $^ | $(MD2ROFF) $(MD2ROFF_FLAGS) | sed -n '/^\.\\\".*/!p' > $@ man: xxhsum.1 clean-man: - rm xxhsum.1 + $(RM) xxhsum.1 preview-man: clean-man man man ./xxhsum.1 -test-all: clean all test test32 test-xxhsum-c clean-xxhsum-c armtest clangtest gpptest sanitize staticAnalyze +test-all: clean all namespaceTest test test32 test-xxhsum-c clean-xxhsum-c armtest clangtest gpptest sanitize staticAnalyze clean: clean-xxhsum-c - @rm -f core *.o xxhsum$(EXT) xxhsum32$(EXT) xxhsum_inlinedXXH$(EXT) xxh32sum xxh64sum + @$(RM) -f core *.o xxhsum$(EXT) xxhsum32$(EXT) xxhsum_inlinedXXH$(EXT) xxh32sum xxh64sum @echo cleaning completed