summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-02-27 20:07:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-02-27 20:11:25 -0400
commit3fdcec92d848e8b2709aaab6d4964254e11ef237 (patch)
treef59cf44b9325925a1d02ed86cbf9907122355b29
parentd4a27c2c8aa9798e19108130b649533e2c9ca9c0 (diff)
faster fast builds
-rw-r--r--Makefile4
-rw-r--r--git-annex.cabal6
2 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a4a56d8d8..7924d2feb 100644
--- a/Makefile
+++ b/Makefile
@@ -10,11 +10,11 @@ build: $(all)
# We bypass cabal, and only run the main ghc --make command for a
# fast development built. Note: Does not rebuild C libraries.
fast: dist/caballog
- $$(grep 'ghc --make' dist/caballog | head -n 1 | sed 's/ -O / /')
+ $$(grep 'ghc --make' dist/caballog | head -n 1)
ln -sf dist/build/git-annex/git-annex git-annex
dist/caballog:
- cabal configure -f-Production
+ cabal configure -f"-Production Fast"
cabal build -v2 | tee $@
Build/SysConfig.hs: configure.hs Build/TestConfig.hs Build/Configure.hs
diff --git a/git-annex.cabal b/git-annex.cabal
index 7d370d34f..096373113 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -55,6 +55,9 @@ Flag DNS
Flag Production
Description: Enable production build (slower build; faster binary)
+Flag Fast
+ Description: Faster build; slower binary
+
Flag Android
Description: Building for Android
Default: False
@@ -81,6 +84,9 @@ Executable git-annex
if flag(Production)
GHC-Options: -O2
+ if flag(Fast)
+ GHC-Options: -O0
+
if flag(TestSuite)
Build-Depends: testpack, HUnit
CPP-Options: -DWITH_TESTSUITE