summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-30 01:32:05 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-30 01:32:05 -0400
commit9c96d86502c521cf78228f816e33ac456fb2ee59 (patch)
tree1dfdc771e6e6d02162f996c0d96551a0cfbba9c7 /Makefile
parentdef137b0cc0c86d9cd976c11b59f7ba0669c0735 (diff)
nasty hack to build when hS3 is not available
So, it would be nicer to just use Cabal and take advantage of its conditional compilation support. But, Cabal seems to lack good support for a package with an internal library that is used by multiple executables. It wants to build everything twice or more. That's too slow for me. Anyway, fairly soon, I expect to upgrade hS3 to a requirment, and I can just revert this.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 8e1664503..6a1531a3c 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,14 @@ SysConfig.hs: configure.hs TestConfig.hs
hsc2hs $<
perl -i -pe 's/^{-# INCLUDE.*//' $@
-$(bins): SysConfig.hs Touch.hs StatFS.hs
+Remote/S3.o:
+ @ln -sf S3real.hs Remote/S3.hs
+ @if ! $(GHCMAKE) Remote/S3.hs; then \
+ ln -sf S3stub.hs Remote/S3.hs; \
+ echo "** building without S3 support"; \
+ fi
+
+$(bins): SysConfig.hs Touch.hs StatFS.hs Remote/S3.o
$(GHCMAKE) $@
git-annex.1: doc/git-annex.mdwn
@@ -62,8 +69,8 @@ docs: $(mans)
--exclude='news/.*'
clean:
- rm -rf build $(bins) $(mans) test configure \
- StatFS.hs Touch.hs SysConfig.hs *.tix .hpc
+ rm -rf build $(bins) $(mans) test configure *.tix .hpc \
+ StatFS.hs Touch.hs SysConfig.hs Remote/S3.hs
rm -rf doc/.ikiwiki html
find . \( -name \*.o -or -name \*.hi \) -exec rm {} \;