summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-09 21:36:11 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-09 21:36:11 -0400
commit737f043c55b13bf8dbd6887d3e78d32d13a8682a (patch)
treea936976a40b2816f0220464043e7c80676af29d3 /Makefile
parent992bf133823b6884e9fb1b320fd33d3fb337ee30 (diff)
fast build mode for vim
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 73e426000..f0f5360b4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,26 @@
PREFIX=/usr
IGNORE=-ignore-package monads-fd
GHCFLAGS=-O2 -Wall $(IGNORE) -fspec-constr-count=5
+
ifdef PROFILE
GHCFLAGS=-prof -auto-all -rtsopts -caf-all -fforce-recomp $(IGNORE)
endif
+
GHCMAKE=ghc $(GHCFLAGS) --make
bins=git-annex git-annex-shell git-union-merge
mans=git-annex.1 git-annex-shell.1 git-union-merge.1
sources=Build/SysConfig.hs Utility/StatFS.hs Utility/Touch.hs Remote/S3.hs
-all: $(bins) $(mans) docs
+all=$(bins) $(mans) docs
+
+# Am I typing :make in vim? Do a fast build without optimisation.
+ifdef VIM
+GHCFLAGS=-Wall $(IGNORE)
+all=$(bins)
+endif
+
+all: $(all)
Build/SysConfig.hs: configure.hs Build/TestConfig.hs
$(GHCMAKE) configure