From cf689b84f9ffc1eed65a16520b96185845fe0644 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sat, 26 Aug 2017 17:08:00 +0200 Subject: [PATCH] Sort input file list 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 | 2 +- programs/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 5845cf17..e31ce043 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -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 diff --git a/programs/Makefile b/programs/Makefile index c5469cfc..5fd3703d 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -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