Sort list of objects in src/backend/distributed/Makefile

Make's $(wildcard) does not sort the glob result, but returns filenames
in filesystem ordering. This makes the build result vary and hence
unreproducible on the binary level. Fix by adding $(sort).

Spotted by Debian's reproducible builds project.
pull/537/head
Christoph Berg 2016-05-18 10:42:20 +02:00
parent ad61d4ae06
commit 7df82baf46
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ SUBDIRS = . commands executor master planner relay test utils worker
# That patsubst rule searches all directories listed in SUBDIRS for .c
# files, and adds the corresponding .o files to OBJS
OBJS += \
$(patsubst $(citus_abs_srcdir)/%.c,%.o,$(foreach dir,$(SUBDIRS), $(wildcard $(citus_abs_srcdir)/$(dir)/*.c)))
$(patsubst $(citus_abs_srcdir)/%.c,%.o,$(foreach dir,$(SUBDIRS), $(sort $(wildcard $(citus_abs_srcdir)/$(dir)/*.c))))
# be explicit about the default target
all: