summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBernhard M. Wiedemann <bwiedemann@suse.de>2017-05-29 15:48:33 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-05-29 16:45:28 +0200
commit081d4c72430e3077a05499c783d9fbe24361b368 (patch)
tree3416051db36b802317761385ab5a3f475af94c10 /Makefile
parent154efc3e429508bf27dbd31ebe66b6e1a26b7ded (diff)
downloadmupdf-081d4c72430e3077a05499c783d9fbe24361b368.tar.xz
sort input files
when building packages (e.g. for openSUSE Linux) (random) filesystem order of input files influences ordering of functions in the output, thus without the patch, builds (in disposable VMs) would differ. See https://reproducible-builds.org/ for why this matters.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 18 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 9adb91d4..7531d392 100644
--- a/Makefile
+++ b/Makefile
@@ -123,14 +123,14 @@ FITZ_HDR := include/mupdf/fitz.h $(wildcard include/mupdf/fitz/*.h)
PDF_HDR := include/mupdf/pdf.h $(wildcard include/mupdf/pdf/*.h)
THREAD_HDR := include/mupdf/helpers/mu-threads.h
-FITZ_SRC := $(wildcard source/fitz/*.c)
-PDF_SRC := $(wildcard source/pdf/*.c)
-XPS_SRC := $(wildcard source/xps/*.c)
-SVG_SRC := $(wildcard source/svg/*.c)
-CBZ_SRC := $(wildcard source/cbz/*.c)
-HTML_SRC := $(wildcard source/html/*.c)
-GPRF_SRC := $(wildcard source/gprf/*.c)
-THREAD_SRC := $(wildcard source/helpers/mu-threads/*.c)
+FITZ_SRC := $(sort $(wildcard source/fitz/*.c))
+PDF_SRC := $(sort $(wildcard source/pdf/*.c))
+XPS_SRC := $(sort $(wildcard source/xps/*.c))
+SVG_SRC := $(sort $(wildcard source/svg/*.c))
+CBZ_SRC := $(sort $(wildcard source/cbz/*.c))
+HTML_SRC := $(sort $(wildcard source/html/*.c))
+GPRF_SRC := $(sort $(wildcard source/gprf/*.c))
+THREAD_SRC := $(sort $(wildcard source/helpers/mu-threads/*.c))
FITZ_SRC_HDR := $(wildcard source/fitz/*.h)
PDF_SRC_HDR := $(wildcard source/pdf/*.h) source/pdf/pdf-name-table.h
@@ -178,11 +178,11 @@ generate: $(NAME_GEN)
HEXDUMP_EXE := $(OUT)/scripts/hexdump.exe
-FONT_BIN_DROID := $(wildcard resources/fonts/droid/*.ttf)
-FONT_BIN_NOTO := $(wildcard resources/fonts/noto/*.ttf)
-FONT_BIN_HAN := $(wildcard resources/fonts/han/*.otf)
-FONT_BIN_URW := $(wildcard resources/fonts/urw/*.cff)
-FONT_BIN_SIL := $(wildcard resources/fonts/sil/*.cff)
+FONT_BIN_DROID := $(sort $(wildcard resources/fonts/droid/*.ttf))
+FONT_BIN_NOTO := $(sort $(wildcard resources/fonts/noto/*.ttf))
+FONT_BIN_HAN := $(sort $(wildcard resources/fonts/han/*.otf))
+FONT_BIN_URW := $(sort $(wildcard resources/fonts/urw/*.cff))
+FONT_BIN_SIL := $(sort $(wildcard resources/fonts/sil/*.cff))
FONT_GEN_DROID := $(subst resources/fonts/droid/, generated/, $(addsuffix .c, $(basename $(FONT_BIN_DROID))))
FONT_GEN_NOTO := $(subst resources/fonts/noto/, generated/, $(addsuffix .c, $(basename $(FONT_BIN_NOTO))))
@@ -222,10 +222,10 @@ generate: $(FONT_GEN)
CMAPDUMP_EXE := $(OUT)/scripts/cmapdump.exe
-CMAP_CJK_SRC := $(wildcard resources/cmaps/cjk/*)
-CMAP_EXTRA_SRC := $(wildcard resources/cmaps/extra/*)
-CMAP_UTF8_SRC := $(wildcard resources/cmaps/utf8/*)
-CMAP_UTF32_SRC := $(wildcard resources/cmaps/utf32/*)
+CMAP_CJK_SRC := $(sort $(wildcard resources/cmaps/cjk/*))
+CMAP_EXTRA_SRC := $(sort $(wildcard resources/cmaps/extra/*))
+CMAP_UTF8_SRC := $(sort $(wildcard resources/cmaps/utf8/*))
+CMAP_UTF32_SRC := $(sort $(wildcard resources/cmaps/utf32/*))
CMAP_GEN := \
generated/pdf-cmap-cjk.c \
@@ -328,7 +328,7 @@ INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
MUTOOL_EXE := $(OUT)/mutool
MUTOOL_SRC := source/tools/mutool.c source/tools/muconvert.c source/tools/mudraw.c source/tools/murun.c
-MUTOOL_SRC += $(wildcard source/tools/pdf*.c)
+MUTOOL_SRC += $(sort $(wildcard source/tools/pdf*.c))
MUTOOL_OBJ := $(MUTOOL_SRC:%.c=$(OUT)/%.o)
$(MUTOOL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
$(MUTOOL_EXE) : $(MUTOOL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)