makefile tweaks

Put build cruft in a subdir
This commit is contained in:
Joey Hess 2012-03-14 23:50:28 -04:00
parent 60ab3d84e1
commit d820099c8f
3 changed files with 9 additions and 8 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
tmp
*.hi *.hi
*.o *.o
test test

View file

@ -1,9 +1,10 @@
PREFIX=/usr PREFIX=/usr
IGNORE=-ignore-package monads-fd IGNORE=-ignore-package monads-fd
GHCFLAGS=-O2 -Wall $(IGNORE) BASEFLAGS=-Wall $(IGNORE) -outputdir tmp
GHCFLAGS=-O2 $(BASEFLAGS)
ifdef PROFILE ifdef PROFILE
GHCFLAGS=-prof -auto-all -rtsopts -caf-all -fforce-recomp $(IGNORE) GHCFLAGS=-prof -auto-all -rtsopts -caf-all -fforce-recomp $(BASEFLAGS)
endif endif
GHCMAKE=ghc $(GHCFLAGS) --make GHCMAKE=ghc $(GHCFLAGS) --make
@ -24,7 +25,7 @@ all: $(all)
sources: $(sources) sources: $(sources)
# Disables optimisation. Not for production use. # Disables optimisation. Not for production use.
fast: GHCFLAGS=-Wall $(IGNORE) fast: GHCFLAGS=$(BASEFLAGS)
fast: $(bins) fast: $(bins)
Build/SysConfig.hs: configure.hs Build/TestConfig.hs Utility/StatFS.hs Build/SysConfig.hs: configure.hs Build/TestConfig.hs Utility/StatFS.hs
@ -65,7 +66,7 @@ test:
testcoverage: testcoverage:
rm -f test.tix test rm -f test.tix test
ghc -odir build/test -hidir build/test $(GHCFLAGS) --make -fhpc test ghc $(GHCFLAGS) -outputdir tmp/testcoverage --make -fhpc test
./test ./test
@echo "" @echo ""
@hpc report test --exclude=Main --exclude=QC @hpc report test --exclude=Main --exclude=QC
@ -89,9 +90,8 @@ docs: $(mans)
--exclude='news/.*' --exclude='news/.*'
clean: clean:
rm -rf build $(bins) $(mans) test configure *.tix .hpc $(sources) rm -rf tmp $(bins) $(mans) test configure *.tix .hpc $(sources) \
rm -rf doc/.ikiwiki html dist doc/.ikiwiki html dist
find . \( -name \*.o -or -name \*.hi \) -exec rm {} \;
# Workaround for cabal sdist not running Setup hooks, so I cannot # Workaround for cabal sdist not running Setup hooks, so I cannot
# generate a file list there. # generate a file list there.

View file

@ -1,5 +1,5 @@
Name: git-annex Name: git-annex
Version: 3.20120309 Version: 3.20120310
Cabal-Version: >= 1.6 Cabal-Version: >= 1.6
License: GPL License: GPL
Maintainer: Joey Hess <joey@kitenet.net> Maintainer: Joey Hess <joey@kitenet.net>