summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-14 23:50:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-15 00:04:28 -0400
commitd820099c8ff3ac208e90dc676eb3d7ea0b8bfd9f (patch)
treed49177e05a6300975544700ddd16ecddab2a0838
parent60ab3d84e188b8dd3a284d962df25bbee41ff1cb (diff)
makefile tweaks
Put build cruft in a subdir
-rw-r--r--.gitignore1
-rw-r--r--Makefile14
-rw-r--r--git-annex.cabal2
3 files changed, 9 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 250d0381c..fe65fc574 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+tmp
*.hi
*.o
test
diff --git a/Makefile b/Makefile
index 08c5b08c0..fbdefc272 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,10 @@
PREFIX=/usr
IGNORE=-ignore-package monads-fd
-GHCFLAGS=-O2 -Wall $(IGNORE)
+BASEFLAGS=-Wall $(IGNORE) -outputdir tmp
+GHCFLAGS=-O2 $(BASEFLAGS)
ifdef PROFILE
-GHCFLAGS=-prof -auto-all -rtsopts -caf-all -fforce-recomp $(IGNORE)
+GHCFLAGS=-prof -auto-all -rtsopts -caf-all -fforce-recomp $(BASEFLAGS)
endif
GHCMAKE=ghc $(GHCFLAGS) --make
@@ -24,7 +25,7 @@ all: $(all)
sources: $(sources)
# Disables optimisation. Not for production use.
-fast: GHCFLAGS=-Wall $(IGNORE)
+fast: GHCFLAGS=$(BASEFLAGS)
fast: $(bins)
Build/SysConfig.hs: configure.hs Build/TestConfig.hs Utility/StatFS.hs
@@ -65,7 +66,7 @@ test:
testcoverage:
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
@echo ""
@hpc report test --exclude=Main --exclude=QC
@@ -89,9 +90,8 @@ docs: $(mans)
--exclude='news/.*'
clean:
- rm -rf build $(bins) $(mans) test configure *.tix .hpc $(sources)
- rm -rf doc/.ikiwiki html dist
- find . \( -name \*.o -or -name \*.hi \) -exec rm {} \;
+ rm -rf tmp $(bins) $(mans) test configure *.tix .hpc $(sources) \
+ doc/.ikiwiki html dist
# Workaround for cabal sdist not running Setup hooks, so I cannot
# generate a file list there.
diff --git a/git-annex.cabal b/git-annex.cabal
index 278d87555..aa86b4441 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -1,5 +1,5 @@
Name: git-annex
-Version: 3.20120309
+Version: 3.20120310
Cabal-Version: >= 1.6
License: GPL
Maintainer: Joey Hess <joey@kitenet.net>