diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-10-22 19:16:19 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-10-22 19:16:19 -0400 |
commit | 3cc43025868fa5115fc9f296f590daa8621e1acf (patch) | |
tree | 3fa6c080edd66a4d7ccab03e56289e88befe9a8f | |
parent | 5aba9a772f5a9bf2c994bfb69d956ef694ae65df (diff) | |
download | keysafe-3cc43025868fa5115fc9f296f590daa8621e1acf.tar.gz |
Makefile: Allow setting BUILDEROPTIONS=-j1 to avoid concurrent build, which should make build reproducible.
(And removed an accidential double $BUILDER build)
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | Makefile | 9 |
2 files changed, 8 insertions, 3 deletions
@@ -8,6 +8,8 @@ keysafe (0.20161022) unstable; urgency=medium Thanks, Sean Whitton * Makefile: Propagate LDFLAGS, CFLAGS, and CPPFLAGS through ghc. * Makefile: Allow setting BUILDER=./Setup to build w/o cabal or stack. + * Makefile: Allow setting BUILDEROPTIONS=-j1 to avoid concurrent + build, which should make build reproducible. -- Joey Hess <id@joeyh.name> Sat, 22 Oct 2016 19:01:24 -0400 @@ -4,6 +4,10 @@ PREFIX?= # Can be "stack" or "cabal", or "./Setup" to build and use Setup.hs BUILDER?=stack +# Options to pass to the BUILDER. +# Using -j1 may result in a reproducible build. +BUILDEROPTIONS?= + # Propigate flags through ghc to linker and compiler. ghc_options=$(shell \ for w in $(LDFLAGS); do \ @@ -24,12 +28,11 @@ build: keysafe: if [ "$(BUILDER)" = ./Setup ]; then ghc --make Setup; fi if [ "$(BUILDER)" = stack ]; then \ - $(BUILDER) build --ghc-options="$(ghc_options)"; \ + $(BUILDER) build --ghc-options="$(ghc_options)" $(BUILDEROPTIONS); \ else \ $(BUILDER) configure --ghc-options="$(ghc_options)"; \ - $(BUILDER) build; \ + $(BUILDER) build $(BUILDEROPTIONS); \ fi - $(BUILDER) build --ghc-options="$(ghc_options)" if [ "$(BUILDER)" = stack ]; then \ ln -sf $$(find .stack-work/ -name keysafe -type f | grep build/keysafe/keysafe | tail -n 1) keysafe; \ else \ |