From 925b9a550643348520a6e2e8aafcd647fd9e1df4 Mon Sep 17 00:00:00 2001 From: Debian Med Packaging Team Date: Tue, 20 Aug 2019 12:33:51 +0100 Subject: [PATCH] blhc-workarounds Gbp-Pq: Name 0019-blhc-workarounds.patch --- Makefile | 42 +++++------ contrib/adaptive-compression/Makefile | 32 ++++---- contrib/gen_html/Makefile | 4 +- contrib/linux-kernel/test/Makefile | 14 ++-- contrib/pzstd/Makefile | 10 +-- contrib/seekable_format/examples/Makefile | 4 +- doc/educational_decoder/Makefile | 24 +++--- examples/Makefile | 18 ++--- lib/Makefile | 90 +++++++++++------------ lib/dll/example/Makefile | 4 +- programs/Makefile | 64 ++++++++-------- tests/Makefile | 20 ++--- tests/fuzz/Makefile | 18 ++--- tests/gzip/Makefile | 12 +-- zlibWrapper/Makefile | 6 +- 15 files changed, 181 insertions(+), 181 deletions(-) diff --git a/Makefile b/Makefile index f2ec8c9..238e745 100644 --- a/Makefile +++ b/Makefile @@ -46,16 +46,16 @@ all32: .PHONY: lib lib-release libzstd.a lib lib-release : - @$(MAKE) -C $(ZSTDDIR) $@ + $(MAKE) -C $(ZSTDDIR) $@ .PHONY: zstd zstd-release zstd zstd-release: - @$(MAKE) -C $(PRGDIR) $@ + $(MAKE) -C $(PRGDIR) $@ cp $(PRGDIR)/zstd$(EXT) . .PHONY: zstdmt zstdmt: - @$(MAKE) -C $(PRGDIR) $@ + $(MAKE) -C $(PRGDIR) $@ cp $(PRGDIR)/zstd$(EXT) ./zstdmt$(EXT) .PHONY: zlibwrapper @@ -108,19 +108,19 @@ cleanTabs: .PHONY: clean clean: - @$(MAKE) -C $(ZSTDDIR) $@ > $(VOID) - @$(MAKE) -C $(PRGDIR) $@ > $(VOID) - @$(MAKE) -C $(TESTDIR) $@ > $(VOID) - @$(MAKE) -C $(ZWRAPDIR) $@ > $(VOID) - @$(MAKE) -C examples/ $@ > $(VOID) - @$(MAKE) -C contrib/gen_html $@ > $(VOID) - @$(MAKE) -C contrib/pzstd $@ > $(VOID) - @$(MAKE) -C contrib/seekable_format/examples $@ > $(VOID) - @$(MAKE) -C contrib/adaptive-compression $@ > $(VOID) - @$(MAKE) -C contrib/largeNbDicts $@ > $(VOID) - @$(RM) zstd$(EXT) zstdmt$(EXT) tmp* - @$(RM) -r lz4 - @echo Cleaning completed + $(MAKE) -C $(ZSTDDIR) $@ > $(VOID) + $(MAKE) -C $(PRGDIR) $@ > $(VOID) + $(MAKE) -C $(TESTDIR) $@ > $(VOID) + $(MAKE) -C $(ZWRAPDIR) $@ > $(VOID) + $(MAKE) -C examples/ $@ > $(VOID) + $(MAKE) -C contrib/gen_html $@ > $(VOID) + $(MAKE) -C contrib/pzstd $@ > $(VOID) + $(MAKE) -C contrib/seekable_format/examples $@ > $(VOID) + $(MAKE) -C contrib/adaptive-compression $@ > $(VOID) + $(MAKE) -C contrib/largeNbDicts $@ > $(VOID) + $(RM) zstd$(EXT) zstdmt$(EXT) tmp* + $(RM) -r lz4 + @echo "==> Cleaning completed" #------------------------------------------------------------------------------ # make install is validated only for Linux, macOS, Hurd and some BSD targets @@ -143,7 +143,7 @@ EGREP = egrep $(EGREP_OPTIONS) ## list: Print all targets and their descriptions (if provided) .PHONY: list list: - @TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \ + TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \ | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \ | $(EGREP) -v -e '^[^[:alnum:]]' | sort); \ { \ @@ -158,13 +158,13 @@ list: .PHONY: install armtest usan asan uasan install: - @$(MAKE) -C $(ZSTDDIR) $@ - @$(MAKE) -C $(PRGDIR) $@ + $(MAKE) -C $(ZSTDDIR) $@ + $(MAKE) -C $(PRGDIR) $@ .PHONY: uninstall uninstall: - @$(MAKE) -C $(ZSTDDIR) $@ - @$(MAKE) -C $(PRGDIR) $@ + $(MAKE) -C $(ZSTDDIR) $@ + $(MAKE) -C $(PRGDIR) $@ .PHONY: travis-install travis-install: diff --git a/contrib/adaptive-compression/Makefile b/contrib/adaptive-compression/Makefile index 2718e9d..a6e861a 100644 --- a/contrib/adaptive-compression/Makefile +++ b/contrib/adaptive-compression/Makefile @@ -32,20 +32,20 @@ datagen : $(PRGDIR)/datagen.c datagencli.c $(CC) $(FLAGS) $^ -o $@ test-adapt-correctness: datagen adapt - @./test-correctness.sh - @echo "test correctness complete" + ./test-correctness.sh + @echo "==> test correctness complete" test-adapt-performance: datagen adapt - @./test-performance.sh - @echo "test performance complete" + ./test-performance.sh + @echo "==> test performance complete" clean: - @$(RM) -f adapt datagen - @$(RM) -rf *.dSYM - @$(RM) -f tmp* - @$(RM) -f tests/*.zst - @$(RM) -f tests/tmp* - @echo "finished cleaning" + $(RM) -f adapt datagen + $(RM) -rf *.dSYM + $(RM) -f tmp* + $(RM) -f tests/*.zst + $(RM) -f tests/tmp* + @echo "==> finished cleaning" #----------------------------------------------------------------------------- # make install is validated only for Linux, macOS, BSD, Hurd and Solaris targets @@ -65,12 +65,12 @@ BINDIR ?= $(PREFIX)/bin INSTALL_PROGRAM ?= $(INSTALL) -m 755 install: adapt - @echo Installing binaries - @$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ - @$(INSTALL_PROGRAM) adapt $(DESTDIR)$(BINDIR)/zstd-adaptive - @echo zstd-adaptive installation completed + @echo "==> Installing binaries" + $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ + $(INSTALL_PROGRAM) adapt $(DESTDIR)$(BINDIR)/zstd-adaptive + @echo "==> zstd-adaptive installation completed" uninstall: - @$(RM) $(DESTDIR)$(BINDIR)/zstd-adaptive - @echo zstd-adaptive programs successfully uninstalled + $(RM) $(DESTDIR)$(BINDIR)/zstd-adaptive + @echo "==> zstd-adaptive programs successfully uninstalled" endif diff --git a/contrib/gen_html/Makefile b/contrib/gen_html/Makefile index 425f266..5697c3a 100644 --- a/contrib/gen_html/Makefile +++ b/contrib/gen_html/Makefile @@ -47,5 +47,5 @@ manual: gen_html $(ZSTDMANUAL) .PHONY: clean clean: - @$(RM) gen_html$(EXT) - @echo Cleaning completed + $(RM) gen_html$(EXT) + @echo "==> Cleaning completed" diff --git a/contrib/linux-kernel/test/Makefile b/contrib/linux-kernel/test/Makefile index 8411462..2d4e276 100644 --- a/contrib/linux-kernel/test/Makefile +++ b/contrib/linux-kernel/test/Makefile @@ -26,17 +26,17 @@ XXHashUserlandTest: XXHashUserlandTest.cpp ../lib/xxhash.o ../../../lib/common/x # Install libfuzzer libFuzzer.a: - @$(RM) -rf Fuzzer - @git clone https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer - @./Fuzzer/build.sh + $(RM) -rf Fuzzer + git clone https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer + ./Fuzzer/build.sh # Install googletest .PHONY: googletest googletest: - @$(RM) -rf googletest - @git clone https://github.com/google/googletest - @mkdir -p googletest/build - @cd googletest/build && cmake .. && $(MAKE) + $(RM) -rf googletest + git clone https://github.com/google/googletest + mkdir -p googletest/build + cd googletest/build && cmake .. && $(MAKE) clean: $(RM) -f *.{o,a} ../lib/zstd/*.{o,a} ../lib/*.o diff --git a/contrib/pzstd/Makefile b/contrib/pzstd/Makefile index 8d2b193..2e2d46d 100644 --- a/contrib/pzstd/Makefile +++ b/contrib/pzstd/Makefile @@ -214,10 +214,10 @@ GTEST_CMAKEFLAGS = .PHONY: googletest googletest: PZSTD_CCXXFLAGS += -fPIC googletest: - @$(RM) -rf googletest - @git clone https://github.com/google/googletest - @mkdir -p googletest/build - @cd googletest/build && cmake $(GTEST_CMAKEFLAGS) -DCMAKE_CXX_FLAGS="$(ALL_CXXFLAGS)" .. && $(MAKE) + $(RM) -rf googletest + git clone https://github.com/google/googletest + mkdir -p googletest/build + cd googletest/build && cmake $(GTEST_CMAKEFLAGS) -DCMAKE_CXX_FLAGS="$(ALL_CXXFLAGS)" .. && $(MAKE) .PHONY: googletest32 googletest32: PZSTD_CCXXFLAGS += -m32 @@ -234,7 +234,7 @@ clean: $(RM) -f utils/test/*.o utils/test/*Test$(EXT) utils/test/*.Td utils/test/*.d $(RM) -f $(PROGDIR)/*.o $(PROGDIR)/*.Td $(PROGDIR)/*.d $(MAKE) -C $(ZSTDDIR) clean - @echo Cleaning completed + @echo "==> Cleaning completed" # Cancel implicit rules diff --git a/contrib/seekable_format/examples/Makefile b/contrib/seekable_format/examples/Makefile index 543780f..a02921a 100644 --- a/contrib/seekable_format/examples/Makefile +++ b/contrib/seekable_format/examples/Makefile @@ -46,8 +46,8 @@ parallel_compression : parallel_compression.c $(SEEKABLE_OBJS) $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ -pthread clean: - @rm -f core *.o tmp* result* *.zst \ + rm -f core *.o tmp* result* *.zst \ seekable_compression seekable_decompression \ seekable_decompression_mem \ parallel_processing parallel_compression - @echo Cleaning completed + @echo "==> Cleaning completed" diff --git a/doc/educational_decoder/Makefile b/doc/educational_decoder/Makefile index c1d2c4c..abddd93 100644 --- a/doc/educational_decoder/Makefile +++ b/doc/educational_decoder/Makefile @@ -18,17 +18,17 @@ harness: $(HARNESS_FILES) $(CC) $(FLAGS) $^ -o $@ clean: - @$(RM) -f harness - @$(RM) -rf harness.dSYM + $(RM) -f harness + $(RM) -rf harness.dSYM test: harness - @zstd README.md -o tmp.zst - @./harness tmp.zst tmp - @diff -s tmp README.md - @$(RM) -f tmp* - @zstd --train harness.c zstd_decompress.c zstd_decompress.h README.md - @zstd -D dictionary README.md -o tmp.zst - @./harness tmp.zst tmp dictionary - @diff -s tmp README.md - @$(RM) -f tmp* dictionary - @make clean + zstd README.md -o tmp.zst + ./harness tmp.zst tmp + diff -s tmp README.md + $(RM) -f tmp* + zstd --train harness.c zstd_decompress.c zstd_decompress.h README.md + zstd -D dictionary README.md -o tmp.zst + ./harness tmp.zst tmp dictionary + diff -s tmp README.md + $(RM) -f tmp* dictionary + make clean diff --git a/examples/Makefile b/examples/Makefile index 65ea8ab..a3330a1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -53,37 +53,37 @@ streaming_memory_usage : streaming_memory_usage.c $(LIB) $(CC) $(CPPFLAGS) $(CFLAGS) $< $(LIB) $(LDFLAGS) -o $@ clean: - @rm -f core *.o tmp* result* *.zst \ + rm -f core *.o tmp* result* *.zst \ simple_compression simple_decompression \ multiple_simple_compression \ dictionary_compression dictionary_decompression \ streaming_compression streaming_decompression \ multiple_streaming_compression streaming_memory_usage - @echo Cleaning completed + @echo "==> Cleaning completed" test: all cp README.md tmp cp Makefile tmp2 - @echo -- Simple compression tests + @echo "-- Simple compression tests" ./simple_compression tmp ./simple_decompression tmp.zst ./multiple_simple_compression *.c ./streaming_decompression tmp.zst > /dev/null - @echo -- Streaming memory usage + @echo "-- Streaming memory usage" ./streaming_memory_usage - @echo -- Streaming compression tests + @echo "-- Streaming compression tests" ./streaming_compression tmp ./streaming_decompression tmp.zst > /dev/null - @echo -- Edge cases detection + @echo "-- Edge cases detection" ! ./streaming_decompression tmp # invalid input, must fail ! ./simple_decompression tmp # invalid input, must fail touch tmpNull # create 0-size file ./simple_compression tmpNull ./simple_decompression tmpNull.zst # 0-size frame : must work - @echo -- Multiple streaming tests + @echo "-- Multiple streaming tests" ./multiple_streaming_compression *.c - @echo -- Dictionary compression tests + @echo "-- Dictionary compression tests" ./dictionary_compression tmp2 tmp README.md ./dictionary_decompression tmp2.zst tmp.zst README.md $(RM) tmp* *.zst - @echo tests completed + @echo "==> tests completed" diff --git a/lib/Makefile b/lib/Makefile index 87a396c..cd37580 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -150,8 +150,8 @@ all: lib libzstd.a: ARFLAGS = rcs libzstd.a: $(ZSTD_OBJ) - @echo compiling static library - @$(AR) $(ARFLAGS) $@ $^ + @echo "==> compiling static library" + $(AR) $(ARFLAGS) $@ $^ libzstd.a-mt: CPPFLAGS += -DZSTD_MULTITHREAD libzstd.a-mt: libzstd.a @@ -160,7 +160,7 @@ ifneq (,$(filter Windows%,$(OS))) LIBZSTD = dll\libzstd.dll $(LIBZSTD): $(ZSTD_FILES) - @echo compiling dynamic library $(LIBVER) + @echo "==> compiling dynamic library $(LIBVER)" $(CC) $(FLAGS) -DZSTD_DLL_EXPORT=1 -Wl,--out-implib,dll\libzstd.lib -shared $^ -o $@ else @@ -168,11 +168,11 @@ else LIBZSTD = libzstd.$(SHARED_EXT_VER) $(LIBZSTD): LDFLAGS += -shared -fPIC -fvisibility=hidden $(LIBZSTD): $(ZSTD_FILES) - @echo compiling dynamic library $(LIBVER) - @$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ - @echo creating versioned links - @ln -sf $@ libzstd.$(SHARED_EXT_MAJOR) - @ln -sf $@ libzstd.$(SHARED_EXT) + @echo "==> compiling dynamic library $(LIBVER)" + $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ + @echo "==> creating versioned links" + ln -sf $@ libzstd.$(SHARED_EXT_MAJOR) + ln -sf $@ libzstd.$(SHARED_EXT) endif @@ -196,16 +196,16 @@ ZSTDMT_FILES = compress/zstdmt_compress.c ZSTD_NOMT_FILES = $(filter-out $(ZSTDMT_FILES),$(ZSTD_FILES)) libzstd-nomt: LDFLAGS += -shared -fPIC -fvisibility=hidden libzstd-nomt: $(ZSTD_NOMT_FILES) - @echo compiling single-thread dynamic library $(LIBVER) - @echo files : $(ZSTD_NOMT_FILES) - @$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ + @echo "==> compiling single-thread dynamic library $(LIBVER)" + @echo "==> files : $(ZSTD_NOMT_FILES)" + $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ clean: - @$(RM) -r *.dSYM # macOS-specific - @$(RM) core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc - @$(RM) dll/libzstd.dll dll/libzstd.lib libzstd-nomt* - @$(RM) common/*.o compress/*.o decompress/*.o dictBuilder/*.o legacy/*.o deprecated/*.o - @echo Cleaning library completed + $(RM) -r *.dSYM # macOS-specific + $(RM) core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc + $(RM) dll/libzstd.dll dll/libzstd.lib libzstd-nomt* + $(RM) common/*.o compress/*.o decompress/*.o dictBuilder/*.o legacy/*.o deprecated/*.o + @echo "==> Cleaning library completed" #----------------------------------------------------------------------------- # make install is validated only for Linux, macOS, BSD, Hurd and Solaris targets @@ -242,50 +242,50 @@ INSTALL_DATA ?= $(INSTALL) -m 644 libzstd.pc: libzstd.pc: libzstd.pc.in - @echo creating pkgconfig - @sed -e 's|@PREFIX@|$(PREFIX)|' \ + @echo "==> creating pkgconfig" + sed -e 's|@PREFIX@|$(PREFIX)|' \ -e 's|@LIBDIR@|$(LIBDIR)|' \ -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \ -e 's|@VERSION@|$(VERSION)|' \ $< >$@ install: install-pc install-static install-shared install-includes - @echo zstd static and shared library installed + @echo "==> zstd static and shared library installed" install-pc: libzstd.pc - @$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ - @$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/ + $(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ + $(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/ install-static: libzstd.a - @echo Installing static library - @$(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ - @$(INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR) + @echo "==> Installing static library" + $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ + $(INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR) install-shared: libzstd - @echo Installing shared library - @$(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ - @$(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR) - @ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) - @ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) + @echo "==> Installing shared library" + $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ + $(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR) + ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) + ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) install-includes: - @echo Installing includes - @$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/ - @$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR) - @$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR) - @$(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR) # prototypes generate deprecation warnings - @$(INSTALL_DATA) dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR) + @echo "==> Installing includes" + $(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/ + $(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR) # prototypes generate deprecation warnings + $(INSTALL_DATA) dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR) uninstall: - @$(RM) $(DESTDIR)$(LIBDIR)/libzstd.a - @$(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) - @$(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) - @$(RM) $(DESTDIR)$(LIBDIR)/$(LIBZSTD) - @$(RM) $(DESTDIR)$(PKGCONFIGDIR)/libzstd.pc - @$(RM) $(DESTDIR)$(INCLUDEDIR)/zstd.h - @$(RM) $(DESTDIR)$(INCLUDEDIR)/zstd_errors.h - @$(RM) $(DESTDIR)$(INCLUDEDIR)/zbuff.h # Deprecated streaming functions - @$(RM) $(DESTDIR)$(INCLUDEDIR)/zdict.h - @echo zstd libraries successfully uninstalled + $(RM) $(DESTDIR)$(LIBDIR)/libzstd.a + $(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) + $(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) + $(RM) $(DESTDIR)$(LIBDIR)/$(LIBZSTD) + $(RM) $(DESTDIR)$(PKGCONFIGDIR)/libzstd.pc + $(RM) $(DESTDIR)$(INCLUDEDIR)/zstd.h + $(RM) $(DESTDIR)$(INCLUDEDIR)/zstd_errors.h + $(RM) $(DESTDIR)$(INCLUDEDIR)/zbuff.h # Deprecated streaming functions + $(RM) $(DESTDIR)$(INCLUDEDIR)/zdict.h + @echo "==> zstd libraries successfully uninstalled" endif diff --git a/lib/dll/example/Makefile b/lib/dll/example/Makefile index 45d0db3..a9cadac 100644 --- a/lib/dll/example/Makefile +++ b/lib/dll/example/Makefile @@ -43,5 +43,5 @@ fullbench-dll: fullbench.c datagen.c $(CC) $(FLAGS) $^ -o $@$(EXT) -DZSTD_DLL_IMPORT=1 $(DLLDIR)/libzstd.dll clean: - @$(RM) fullbench-dll$(EXT) fullbench-lib$(EXT) \ - @echo Cleaning completed + $(RM) fullbench-dll$(EXT) fullbench-lib$(EXT) \ + @echo "==> Cleaning completed" diff --git a/programs/Makefile b/programs/Makefile index 64dcae0..10f485c 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -221,7 +221,7 @@ zstd-pgo : $(MAKE) zstd MOREFLAGS=-fprofile-use # minimal target, with only zstd compression and decompression. no bench. no legacy. -zstd-small: CFLAGS = -Os -s +zstd-small: CFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Os -s zstd-frugal zstd-small: $(ZSTD_FILES) zstdcli.c util.c timefn.c fileio.c $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT $^ -o $@$(EXT) @@ -241,12 +241,12 @@ generate_res: .PHONY: clean clean: $(MAKE) -C $(ZSTDDIR) clean - @$(RM) $(ZSTDDIR)/decompress/*.o $(ZSTDDIR)/decompress/zstd_decompress.gcda - @$(RM) core *.o tmp* result* *.gcda dictionary *.zst \ + $(RM) $(ZSTDDIR)/decompress/*.o $(ZSTDDIR)/decompress/zstd_decompress.gcda + $(RM) core *.o tmp* result* *.gcda dictionary *.zst \ zstd$(EXT) zstd32$(EXT) zstd-compress$(EXT) zstd-decompress$(EXT) \ zstd-small$(EXT) zstd-frugal$(EXT) zstd-nolegacy$(EXT) zstd4$(EXT) \ *.gcda default.profraw have_zlib$(EXT) - @echo Cleaning completed + @echo "==> Cleaning completed" MD2ROFF = ronn MD2ROFF_FLAGS = --roff --warnings --manual="User Commands" --organization="zstd $(ZSTD_VERSION)" @@ -293,7 +293,7 @@ EGREP = egrep $(EGREP_OPTIONS) ## list: Print all targets and their descriptions (if provided) .PHONY: list list: - @TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \ + TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \ | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \ | $(EGREP) -v -e '^[^[:alnum:]]' | sort); \ { \ @@ -340,35 +340,35 @@ INSTALL_MAN ?= $(INSTALL_DATA) .PHONY: install install: zstd - @echo Installing binaries - @$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MAN1DIR)/ - @$(INSTALL_PROGRAM) zstd $(DESTDIR)$(BINDIR)/zstd - @ln -sf zstd $(DESTDIR)$(BINDIR)/zstdcat - @ln -sf zstd $(DESTDIR)$(BINDIR)/unzstd - @ln -sf zstd $(DESTDIR)$(BINDIR)/zstdmt - @$(INSTALL_SCRIPT) zstdless $(DESTDIR)$(BINDIR)/zstdless - @$(INSTALL_SCRIPT) zstdgrep $(DESTDIR)$(BINDIR)/zstdgrep - @echo Installing man pages - @$(INSTALL_MAN) zstd.1 $(DESTDIR)$(MAN1DIR)/zstd.1 - @ln -sf zstd.1 $(DESTDIR)$(MAN1DIR)/zstdcat.1 - @ln -sf zstd.1 $(DESTDIR)$(MAN1DIR)/unzstd.1 - @$(INSTALL_MAN) zstdgrep.1 $(DESTDIR)$(MAN1DIR)/zstdgrep.1 - @$(INSTALL_MAN) zstdless.1 $(DESTDIR)$(MAN1DIR)/zstdless.1 - @echo zstd installation completed + @echo "==> Installing binaries" + $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MAN1DIR)/ + $(INSTALL_PROGRAM) zstd $(DESTDIR)$(BINDIR)/zstd + ln -sf zstd $(DESTDIR)$(BINDIR)/zstdcat + ln -sf zstd $(DESTDIR)$(BINDIR)/unzstd + ln -sf zstd $(DESTDIR)$(BINDIR)/zstdmt + $(INSTALL_SCRIPT) zstdless $(DESTDIR)$(BINDIR)/zstdless + $(INSTALL_SCRIPT) zstdgrep $(DESTDIR)$(BINDIR)/zstdgrep + @echo "==> Installing man pages" + $(INSTALL_MAN) zstd.1 $(DESTDIR)$(MAN1DIR)/zstd.1 + ln -sf zstd.1 $(DESTDIR)$(MAN1DIR)/zstdcat.1 + ln -sf zstd.1 $(DESTDIR)$(MAN1DIR)/unzstd.1 + $(INSTALL_MAN) zstdgrep.1 $(DESTDIR)$(MAN1DIR)/zstdgrep.1 + $(INSTALL_MAN) zstdless.1 $(DESTDIR)$(MAN1DIR)/zstdless.1 + @echo "==> zstd installation completed" .PHONY: uninstall uninstall: - @$(RM) $(DESTDIR)$(BINDIR)/zstdgrep - @$(RM) $(DESTDIR)$(BINDIR)/zstdless - @$(RM) $(DESTDIR)$(BINDIR)/zstdcat - @$(RM) $(DESTDIR)$(BINDIR)/unzstd - @$(RM) $(DESTDIR)$(BINDIR)/zstdmt - @$(RM) $(DESTDIR)$(BINDIR)/zstd - @$(RM) $(DESTDIR)$(MAN1DIR)/zstdless.1 - @$(RM) $(DESTDIR)$(MAN1DIR)/zstdgrep.1 - @$(RM) $(DESTDIR)$(MAN1DIR)/zstdcat.1 - @$(RM) $(DESTDIR)$(MAN1DIR)/unzstd.1 - @$(RM) $(DESTDIR)$(MAN1DIR)/zstd.1 - @echo zstd programs successfully uninstalled + $(RM) $(DESTDIR)$(BINDIR)/zstdgrep + $(RM) $(DESTDIR)$(BINDIR)/zstdless + $(RM) $(DESTDIR)$(BINDIR)/zstdcat + $(RM) $(DESTDIR)$(BINDIR)/unzstd + $(RM) $(DESTDIR)$(BINDIR)/zstdmt + $(RM) $(DESTDIR)$(BINDIR)/zstd + $(RM) $(DESTDIR)$(MAN1DIR)/zstdless.1 + $(RM) $(DESTDIR)$(MAN1DIR)/zstdgrep.1 + $(RM) $(DESTDIR)$(MAN1DIR)/zstdcat.1 + $(RM) $(DESTDIR)$(MAN1DIR)/unzstd.1 + $(RM) $(DESTDIR)$(MAN1DIR)/zstd.1 + @echo "==> zstd programs successfully uninstalled" endif diff --git a/tests/Makefile b/tests/Makefile index bd2f909..3104697 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -79,7 +79,7 @@ DECODECORPUS_TESTTIME ?= -T30 .PHONY: default all all32 allnothread dll clean test test32 test-all versionsTest default: fullbench - @echo $(ZSTDMT_OBJECTS) + @echo "$(ZSTDMT_OBJECTS)" all: fullbench fuzzer zstreamtest paramgrill datagen decodecorpus roundTripCrash \ fullbench-lib poolTests @@ -249,8 +249,8 @@ checkTag: checkTag.c $(ZSTDDIR)/zstd.h clean: $(MAKE) -C $(ZSTDDIR) clean $(MAKE) -C $(PRGDIR) clean - @$(RM) -fR $(TESTARTEFACT) - @$(RM) -f core *.o tmp* *.tmp result* *.gcda dictionary *.zst \ + $(RM) -fR $(TESTARTEFACT) + $(RM) -f core *.o tmp* *.tmp result* *.gcda dictionary *.zst \ $(PRGDIR)/zstd$(EXT) $(PRGDIR)/zstd32$(EXT) \ fullbench$(EXT) fullbench32$(EXT) \ fullbench-lib$(EXT) fullbench-dll$(EXT) \ @@ -260,7 +260,7 @@ clean: datagen$(EXT) paramgrill$(EXT) roundTripCrash$(EXT) longmatch$(EXT) \ symbols$(EXT) invalidDictionaries$(EXT) legacy$(EXT) poolTests$(EXT) \ decodecorpus$(EXT) checkTag$(EXT) bigdict$(EXT) - @echo Cleaning completed + @echo "==> Cleaning completed" #---------------------------------------------------------------------------------- @@ -279,7 +279,7 @@ valgrindTest: zstd datagen fuzzer fullbench ./datagen -g2930KB | $(VALGRIND) $(PRGDIR)/zstd -5 -vf - -o tmp $(VALGRIND) $(PRGDIR)/zstd -vdf tmp -c > $(VOID) ./datagen -g64MB | $(VALGRIND) $(PRGDIR)/zstd -vf - -c > $(VOID) - @rm tmp + rm tmp $(VALGRIND) ./fuzzer -T1mn -t1 $(VALGRIND) ./fullbench -i1 @@ -303,7 +303,7 @@ endif .PHONY: list list: - @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs + $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs .PHONY: shortest shortest: ZSTDRTTEST= @@ -417,9 +417,9 @@ test-decodecorpus: decodecorpus test-decodecorpus-cli: decodecorpus @echo "\n ---- decodecorpus basic cli tests ----" - @mkdir testdir + mkdir testdir ./decodecorpus -n5 -otestdir -ptestdir - @cd testdir && \ + cd testdir && \ $(ZSTD) -d z000000.zst -o tmp0 && \ $(ZSTD) -d z000001.zst -o tmp1 && \ $(ZSTD) -d z000002.zst -o tmp2 && \ @@ -434,7 +434,7 @@ test-decodecorpus-cli: decodecorpus cd .. @echo "\n ---- decodecorpus dictionary cli tests ----" ./decodecorpus -n5 -otestdir -ptestdir --use-dict=1MB - @cd testdir && \ + cd testdir && \ $(ZSTD) -d z000000.zst -D dictionary -o tmp0 && \ $(ZSTD) -d z000001.zst -D dictionary -o tmp1 && \ $(ZSTD) -d z000002.zst -D dictionary -o tmp2 && \ @@ -446,7 +446,7 @@ test-decodecorpus-cli: decodecorpus diff z000003 tmp3 && \ diff z000004 tmp4 && \ cd .. - @rm -rf testdir + rm -rf testdir test-pool: poolTests $(QEMU_SYS) ./poolTests diff --git a/tests/fuzz/Makefile b/tests/fuzz/Makefile index 8bf16b1..557a7a8 100644 --- a/tests/fuzz/Makefile +++ b/tests/fuzz/Makefile @@ -118,12 +118,12 @@ libregression.a: $(FUZZ_HEADERS) $(PRGDIR)/util.h $(PRGDIR)/util.c regression_dr # set LDFLAGS=-L. .PHONY: libFuzzer libFuzzer: - @$(RM) -rf Fuzzer - @git clone https://chromium.googlesource.com/chromium/llvm-project/compiler-rt/lib/fuzzer Fuzzer - @cd Fuzzer && ./build.sh + $(RM) -rf Fuzzer + git clone https://chromium.googlesource.com/chromium/llvm-project/compiler-rt/lib/fuzzer Fuzzer + cd Fuzzer && ./build.sh corpora/%_seed_corpus.zip: - @mkdir -p corpora + mkdir -p corpora $(DOWNLOAD) $@ $(CORPORA_URL_PREFIX)$*_seed_corpus.zip corpora/%: corpora/%_seed_corpus.zip @@ -140,13 +140,13 @@ regressiontest: corpora $(PYTHON) ./fuzz.py regression all clean: - @$(MAKE) -C $(ZSTDDIR) clean - @$(RM) *.a *.o - @$(RM) simple_round_trip stream_round_trip simple_decompress \ + $(MAKE) -C $(ZSTDDIR) clean + $(RM) *.a *.o + $(RM) simple_round_trip stream_round_trip simple_decompress \ stream_decompress block_decompress block_round_trip \ simple_compress dictionary_round_trip dictionary_decompress \ zstd_frame_info cleanall: - @$(RM) -r Fuzzer - @$(RM) -r corpora + $(RM) -r Fuzzer + $(RM) -r corpora diff --git a/tests/gzip/Makefile b/tests/gzip/Makefile index c5d6720..ebaaba8 100644 --- a/tests/gzip/Makefile +++ b/tests/gzip/Makefile @@ -16,20 +16,20 @@ export PATH := .:$(PATH) all: test-helin-segv test-hufts test-keep test-list test-memcpy-abuse test-mixed all: test-null-suffix-clobber test-stdin test-trailing-nul test-unpack-invalid all: test-zdiff test-zgrep-context test-zgrep-f test-zgrep-signal test-znew-k test-z-suffix - @echo Testing completed + @echo "==> Testing completed" .PHONY: zstd zstd: $(MAKE) -C $(PRGDIR) zstd ln -sf $(PRGDIR)/zstd gzip - @echo PATH=$(PATH) + @echo "==> PATH=$(PATH)" gzip --version .PHONY: clean clean: - @$(MAKE) -C $(PRGDIR) $@ > $(VOID) - @$(RM) *.trs *.log - @echo Cleaning completed + $(MAKE) -C $(PRGDIR) $@ > $(VOID) + $(RM) *.trs *.log + @echo "==> Cleaning completed" #------------------------------------------------------------------------------ @@ -38,7 +38,7 @@ clean: ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD)) test-%: zstd - @./test-driver.sh --test-name $* --log-file $*.log --trs-file $*.trs --expect-failure "no" --color-tests "yes" --enable-hard-errors "yes" ./$*.sh + ./test-driver.sh --test-name $* --log-file $*.log --trs-file $*.trs --expect-failure "no" --color-tests "yes" --enable-hard-errors "yes" ./$*.sh # || echo ignoring error endif diff --git a/zlibWrapper/Makefile b/zlibWrapper/Makefile index ae5f092..f8cafb6 100644 --- a/zlibWrapper/Makefile +++ b/zlibWrapper/Makefile @@ -43,14 +43,14 @@ test: example fitblk example_zstd fitblk_zstd zwrapbench minigzip minigzip_zstd ./fitblk 40960 <$(TEST_FILE) ./fitblk_zstd 10240 <$(TEST_FILE) ./fitblk_zstd 40960 <$(TEST_FILE) - @echo ---- minigzip start ---- + @echo "---- minigzip start ----" ./minigzip_zstd example$(EXT) #cp example$(EXT).gz example$(EXT)_zstd.gz ./minigzip_zstd -d example$(EXT).gz ./minigzip example$(EXT) #cp example$(EXT).gz example$(EXT)_gz.gz ./minigzip_zstd -d example$(EXT).gz - @echo ---- minigzip end ---- + @echo "---- minigzip end ----" ./zwrapbench -qi1b3B1K $(TEST_FILE) ./zwrapbench -rqi1b1e5 ../lib ../programs ../tests @@ -107,4 +107,4 @@ $(ZSTDLIBDIR)/libzstd.so: clean: -$(RM) $(ZLIBWRAPPER_PATH)/*.o $(EXAMPLE_PATH)/*.o *.o foo.gz example$(EXT) example_zstd$(EXT) fitblk$(EXT) fitblk_zstd$(EXT) zwrapbench$(EXT) minigzip$(EXT) minigzip_zstd$(EXT) - @echo Cleaning completed + @echo "==> Cleaning completed" -- 2.30.2