diff options
author | roktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-11-03 05:44:22 +0000 |
---|---|---|
committer | roktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-11-03 05:44:22 +0000 |
commit | 24e56f38c6c73f7fd2aba731820b0b033605610a (patch) | |
tree | 77e7358067b09bb8098c5b3183bba8f783a7a6ee /Makefile | |
parent | 2d7043ba5959fd08296a49405d43b370f412a1f2 (diff) | |
download | pandoc-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-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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)"; \ |