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.
This commit is contained in:
parent
77cd327170
commit
8925d975a9
1 changed files with 6 additions and 4 deletions
10
Makefile
10
Makefile
|
@ -1,6 +1,7 @@
|
||||||
CFLAGS=-Wall
|
CFLAGS=-Wall
|
||||||
|
GIT_ANNEX_TMP_BUILD_DIR=tmp
|
||||||
IGNORE=-ignore-package monads-fd -ignore-package monads-tf
|
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
|
FEATURES=-DWITH_ASSISTANT -DWITH_S3 -DWITH_WEBAPP
|
||||||
|
|
||||||
bins=git-annex
|
bins=git-annex
|
||||||
|
@ -63,7 +64,8 @@ $(thfiles):
|
||||||
touch $(thfiles)
|
touch $(thfiles)
|
||||||
|
|
||||||
git-annex: $(sources) $(clibs) $(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
|
git-annex.1: doc/git-annex.mdwn
|
||||||
./mdwn2man git-annex 1 doc/git-annex.mdwn > git-annex.1
|
./mdwn2man git-annex 1 doc/git-annex.mdwn > git-annex.1
|
||||||
|
@ -99,7 +101,7 @@ test: $(sources) $(clibs)
|
||||||
|
|
||||||
testcoverage:
|
testcoverage:
|
||||||
rm -f test.tix test
|
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
|
./test
|
||||||
@echo ""
|
@echo ""
|
||||||
@hpc report test --exclude=Main --exclude=QC
|
@hpc report test --exclude=Main --exclude=QC
|
||||||
|
@ -123,7 +125,7 @@ docs: $(mans)
|
||||||
--exclude='news/.*'
|
--exclude='news/.*'
|
||||||
|
|
||||||
clean:
|
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)
|
doc/.ikiwiki html dist $(clibs)
|
||||||
|
|
||||||
sdist: clean $(mans)
|
sdist: clean $(mans)
|
||||||
|
|
Loading…
Reference in a new issue