summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-02-27 03:03:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-02-27 03:05:33 -0400
commit5a967aa593d2b8ea4bcc7aae0b70dddec736a8f7 (patch)
tree802eb513f8fb1db31df1b39da9d29f0d380d587e
parent9ad84a7749b0cbe33611481a2d9b1f2f5dea51af (diff)
got make fast back down to 20 seconds
This approach could also be used to get ./ghci back.. just munge the extracted ghc command from cabal.
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 173fccb1d..18dd788b9 100644
--- a/Makefile
+++ b/Makefile
@@ -7,11 +7,15 @@ PREFIX=/usr
build: $(all)
-fast:
- @if [ ! -e dist/setup-config ] || grep -- -O2 dist/setup-config; then \
- cabal configure -f-Production; \
- fi
- $(MAKE) git-annex
+# 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 / /')
+ ln -sf dist/build/git-annex/git-annex git-annex
+
+dist/caballog: dist/setup-config
+ cabal configure -f-Production
+ cabal build -v2 | tee $@
Build/SysConfig.hs: configure.hs Build/TestConfig.hs Build/Configure.hs
cabal configure