]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Sort input file list 818/head
authorBernhard M. Wiedemann <bwiedemann@suse.de>
Sat, 26 Aug 2017 15:08:00 +0000 (17:08 +0200)
committerBernhard M. Wiedemann <bwiedemann@suse.de>
Sat, 26 Aug 2017 15:08:00 +0000 (17:08 +0200)
in order to make builds reproducible
in spite of indeterministic filesystem readdir order.
See https://reproducible-builds.org/ for why this is good.

lib/Makefile
programs/Makefile

index 5845cf170e7182333ccad2530788da37e0d9f924..e31ce0438aca4532a142cb827fab25d2d5e24f0c 100644 (file)
@@ -31,7 +31,7 @@ CFLAGS  += $(DEBUGFLAGS) $(MOREFLAGS)
 FLAGS    = $(CPPFLAGS) $(CFLAGS)
 
 
-ZSTD_FILES := $(wildcard common/*.c compress/*.c decompress/*.c dictBuilder/*.c deprecated/*.c)
+ZSTD_FILES := $(sort $(wildcard common/*.c compress/*.c decompress/*.c dictBuilder/*.c deprecated/*.c))
 
 ZSTD_LEGACY_SUPPORT ?= 4
 
index c5469cfc4defd783082e8214fcbddbc52b06b252..5fd3703d462e9e76e256f43a86f1f11ca31ed93b 100644 (file)
@@ -68,7 +68,7 @@ endif
 else
 endif
 
-ZSTDLIB_FILES := $(wildcard $(ZSTD_FILES)) $(wildcard $(ZSTDLEGACY_FILES)) $(wildcard $(ZDICT_FILES))
+ZSTDLIB_FILES := $(sort $(wildcard $(ZSTD_FILES)) $(wildcard $(ZSTDLEGACY_FILES)) $(wildcard $(ZDICT_FILES)))
 ZSTDLIB_OBJ   := $(patsubst %.c,%.o,$(ZSTDLIB_FILES))
 
 # Define *.exe as extension for Windows systems