summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-11-28 23:24:27 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-11-28 23:24:27 -0800
commite3524c90de918d0b4a74d70768175561758f0d70 (patch)
treea7be0273a13b7b7cb70a53303e81140b06bd265b /Makefile
parent86ed1cf3b90aa7713558f2d7466ae214f42aa684 (diff)
scripts: Make archive build reproducible
We used to use the current timestamp when building the archive; switch to using the timestamp of the tag with the version we're packaging. This requires some monkey patching since tarfile module is always using current timestamp when writing gzip header... Also exclude archive.py from archive and simplify release file list in Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 84290c7..13eb1cb 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ SOURCES=src/pugixml.cpp $(filter-out tests/fuzz_%,$(wildcard tests/*.cpp))
EXECUTABLE=$(BUILD)/test
VERSION=$(shell sed -n 's/.*version \(.*\).*/\1/p' src/pugiconfig.hpp)
-RELEASE=$(shell git ls-files src docs/*.html docs/*.css docs/samples docs/images scripts contrib CMakeLists.txt readme.txt)
+RELEASE=$(filter-out scripts/archive.py docs/%.adoc,$(shell git ls-files contrib docs scripts src CMakeLists.txt readme.txt))
CXXFLAGS=-g -Wall -Wextra -Werror -pedantic -Wundef -Wshadow -Wcast-align -Wcast-qual -Wold-style-cast
LDFLAGS=
@@ -82,7 +82,7 @@ docs: docs/quickstart.html docs/manual.html
build/pugixml-%: .FORCE | $(RELEASE)
@mkdir -p $(BUILD)
- python scripts/archive.py $@ pugixml-$(VERSION) $|
+ TIMESTAMP=`git show v$(VERSION) -s --format=%ct` && python scripts/archive.py $@ pugixml-$(VERSION) $$TIMESTAMP $|
$(EXECUTABLE): $(OBJECTS)
$(CXX) $(OBJECTS) $(LDFLAGS) -o $@