summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-01-07 02:15:23 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-01-07 02:15:23 -0400
commitf189929b8b46016a254a6a938f9aba01184fb6c6 (patch)
treea38a3b8744c23adf5b3a9a1a3061b4f3d5dd49c6 /Makefile
parent55ca64d8510fc3acd34452844086fbcb4bca122c (diff)
workaround ghc weirdness with -odir
The option cause it to always build to build/Main.o, no matter what binary it was building. This caused extra work, and in some cases, could cause the wrong code to be put into the final binary.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e499d492c..44d4be02b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
PREFIX=/usr
GHCFLAGS=-O2 -Wall
-GHCMAKE=ghc -odir build -hidir build $(GHCFLAGS) --make
+GHCMAKE=ghc $(GHCFLAGS) --make
bins=git-annex git-annex-shell
mans=git-annex.1 git-annex-shell.1
@@ -29,11 +29,11 @@ install: all
rsync -a --delete html/ $(DESTDIR)$(PREFIX)/share/doc/git-annex/html/; \
fi
-test:
+test: $(bins)
$(GHCMAKE) test
./test
-testcoverage:
+testcoverage: $(bins)
rm -f test.tix test
ghc -odir build/test -hidir build/test $(GHCFLAGS) --make -fhpc test
./test
@@ -59,5 +59,6 @@ docs: $(mans)
clean:
rm -rf build $(bins) $(mans) test configure SysConfig.hs *.tix .hpc
rm -rf doc/.ikiwiki html
+ find . \( -name \*.o -or -name \*.hi \) -exec rm {} \;
.PHONY: $(bins) test install