summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-07 12:03:42 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-07 12:05:24 -0400
commit8925d975a9d5c86291d50762418c348b8c7725cc (patch)
treed0306bf121082568b91f083367865967a6c5449b /Makefile
parent77cd32717080428d830fdaf543cd29edf8bfabbc (diff)
build in GIT_ANNEX_TMP_BUILD_DIR
This allows setting GIT_ANNEX_TMP_BUILD_DIR to be on a ramdisk, and all the .o files as well as the git-annex binary are written there. A useful optimisation for me to avoid SSD write thrashing during development.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index bd8aa4f3f..21cb41480 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
CFLAGS=-Wall
+GIT_ANNEX_TMP_BUILD_DIR=tmp
IGNORE=-ignore-package monads-fd -ignore-package monads-tf
-BASEFLAGS=-threaded -Wall $(IGNORE) -outputdir tmp -IUtility
+BASEFLAGS=-threaded -Wall $(IGNORE) -outputdir $(GIT_ANNEX_TMP_BUILD_DIR) -IUtility
FEATURES=-DWITH_ASSISTANT -DWITH_S3 -DWITH_WEBAPP
bins=git-annex
@@ -63,7 +64,8 @@ $(thfiles):
touch $(thfiles)
git-annex: $(sources) $(clibs) $(thfiles)
- $(GHCMAKE) $@ $(clibs)
+ $(GHCMAKE) $@ -o $(GIT_ANNEX_TMP_BUILD_DIR)/git-annex $(clibs)
+ ln -sf $(GIT_ANNEX_TMP_BUILD_DIR)/git-annex git-annex
git-annex.1: doc/git-annex.mdwn
./mdwn2man git-annex 1 doc/git-annex.mdwn > git-annex.1
@@ -99,7 +101,7 @@ test: $(sources) $(clibs)
testcoverage:
rm -f test.tix test
- ghc $(GHCFLAGS) -outputdir tmp/testcoverage --make -fhpc test
+ ghc $(GHCFLAGS) -outputdir $(GIT_ANNEX_TMP_BUILD_DIR)/testcoverage --make -fhpc test
./test
@echo ""
@hpc report test --exclude=Main --exclude=QC
@@ -123,7 +125,7 @@ docs: $(mans)
--exclude='news/.*'
clean:
- rm -rf tmp $(bins) $(mans) test configure *.tix .hpc $(sources) \
+ rm -rf $(GIT_ANNEX_TMP_BUILD_DIR) $(bins) $(mans) test configure *.tix .hpc $(sources) \
doc/.ikiwiki html dist $(clibs)
sdist: clean $(mans)