From 246d0d45d7381b1e84fe2f51870a1e1536466ac0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 5 Feb 2016 13:56:27 -0400 Subject: [PATCH] move -j1 setting to BUILDEROPTIONS, set in debian/rules file I needed BUILDEROPTIONS to allow passing flags to stack build, but it also lets me move the -j1 out of the normal build path, and to debian/rules which has the goal of having a reproducible build --- Makefile | 5 ++--- debian/rules | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6d8dca5994..e2eb88214e 100644 --- a/Makefile +++ b/Makefile @@ -18,14 +18,13 @@ build: $(all) Build/SysConfig.hs: configure.hs Build/TestConfig.hs Build/Configure.hs if [ "$(BUILDER)" = ./Setup ]; then ghc --make Setup; fi if [ "$(BUILDER)" = stack ]; then \ - $(BUILDER) build -j1; \ + $(BUILDER) build $(BUILDEROPTIONS); \ else \ $(BUILDER) configure --ghc-options="$(shell Build/collect-ghc-options.sh)"; \ fi -# -j1 is used for reproducible build git-annex: Build/SysConfig.hs - $(BUILDER) build -j1 + $(BUILDER) build $(BUILDEROPTIONS) if [ "$(BUILDER)" = stack ]; then \ ln -sf $$(find .stack-work/ -name git-annex -type f | grep build/git-annex/git-annex | tail -n 1) git-annex; \ else \ diff --git a/debian/rules b/debian/rules index 7523e2f83d..b290eadcd7 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,9 @@ export BUILDER=debian/cabal-wrapper +# -j1 is used for reproducible build +export BUILDEROPTIONS=-j1 + STANDALONE_BUILD=$(shell grep -qe '^Package: git-annex-standalone' debian/control \ && echo 1 || echo 0)