From 78991c482088d6d71d709ddc9522a2608f691df7 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sat, 20 May 2017 22:49:36 +0200 Subject: [PATCH 1/2] do not embed timestamps in .gz files using gzip -n to produce bit-identical results and -9 to compress a bit better --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index dbef95d9..7a06d8d9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -77,7 +77,7 @@ kak$(suffix) : $(objects) # Generate the man page ../doc/kak.1.gz: ../doc/kak.1.txt a2x --no-xmllint -f manpage $< - gzip -f $(basename $<) + gzip -n -9 -f $(basename $<) # Generate the editor's documentation pages # Since `a2x` won't generate man pages if some sections are missing (which we don't need), @@ -86,7 +86,7 @@ kak$(suffix) : $(objects) a2x --no-xmllint -f manpage $< sed -i -r -e "s,^\.TH .+,.TH KAKOUNE 1 \"\" \"\" \"$(basename $(notdir $<))\"," \ -e "/^\.SH \"NAME\"/{N;d;}" $(@:.gz=.1) - gzip -f $(@:.gz=.1) + gzip -n -9 -f $(@:.gz=.1) mv -f $(@:.gz=.1.gz) $@ check: test From 4788112f2dd09118097de46f403210be3a35c5e7 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sat, 20 May 2017 22:50:25 +0200 Subject: [PATCH 2/2] Always link input files in the same order to produce bit-identical 'kak' binaries See https://reproducible-builds.org/ for why this is good. This change is needed because filesystem ordering is random and ordering matters for the g++ linker --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 7a06d8d9..cde2b943 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,7 +13,7 @@ else endif endif -sources := $(wildcard *.cc) +sources := $(sort $(wildcard *.cc)) objects := $(addprefix ., $(sources:.cc=$(suffix).o)) deps := $(addprefix ., $(sources:.cc=$(suffix).d)) docs := $(wildcard ../doc/manpages/*.asciidoc)