aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorroktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-03 05:44:22 +0000
committerroktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-03 05:44:22 +0000
commit24e56f38c6c73f7fd2aba731820b0b033605610a (patch)
tree77e7358067b09bb8098c5b3183bba8f783a7a6ee /Makefile
parent2d7043ba5959fd08296a49405d43b370f412a1f2 (diff)
downloadpandoc-24e56f38c6c73f7fd2aba731820b0b033605610a.tar.gz
Older Cabal versions have no '--destdir' option. Detect the availability
of this option and fallback to '--copy-prefix' (which is now deprecated, as of GHC 6.6). Add a short comment to cabalize. git-svn-id: https://pandoc.googlecode.com/svn/trunk@72 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 25cbbe2f5..a59446ca1 100644
--- a/Makefile
+++ b/Makefile
@@ -164,7 +164,13 @@ uninstall-program: uninstall-exec uninstall-doc
.PHONY: install-all uninstall-all
install-all: install-doc install-lib-doc
destdir=$(DESTDIR); destdir=$${destdir:-/}; \
- $(BUILDCMD) copy --destdir=$$destdir; \
+ # Older Cabal versions have no '--destdir' option.
+ if $(BUILDCMD) copy --help | grep -q '\-\-destdir'; then \
+ opt='--destdir=$$destdir'; \
+ else \
+ opt="--copy-prefix=$${destdir}$(PREFIX)"; \
+ fi; \
+ $(BUILDCMD) copy $$opt; \
$(BUILDCMD) register
uninstall-all: uninstall-exec uninstall-doc uninstall-lib-doc
-pkg_id="$(NAME)-$(VERSION)"; \