summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-10-30 05:40:41 +0000
committerroktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-10-30 05:40:41 +0000
commitfe92360ea2dc3863d3c1bed816037f921706d343 (patch)
treeec840736fc0088428916cb9cef02300c22023d0a
parentdb9cebdf9152fe1c3ea1ce324a6b2aceb01807fb (diff)
* cabalize: fix cabal version detection by using a bloody hack.
* Makefile: + Make 'uninstall-all' depends on 'uninstall-exec'. + Make the default target 'all' depends on $(BINS). Now, invoking a plain 'make' builds and creates pandoc in the top directory. git-svn-id: https://pandoc.googlecode.com/svn/trunk@39 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--Makefile4
-rwxr-xr-xcabalize5
2 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 60afaea8b..b3b68bc45 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,7 @@ GHC_PKG := ghc-pkg
#-------------------------------------------------------------------------------
.PHONY: all
-all: build
+all: $(BINS)
.PHONY: templates
templates: $(SRCDIR)/templates
@@ -136,7 +136,7 @@ install-all: install-doc install-lib-doc
destdir=$(DESTDIR); destdir=$${destdir:-/}; \
$(BUILDCMD) copy --destdir=$$destdir; \
$(BUILDCMD) register
-uninstall-all: uninstall-doc uninstall-lib-doc
+uninstall-all: uninstall-exec uninstall-doc uninstall-lib-doc
-pkg_id="$(NAME)-$(VERSION)"; \
libdir=$$($(GHC_PKG) field $$pkg_id library-dirs 2>/dev/null | \
sed 's/^library-dirs: *//'); \
diff --git a/cabalize b/cabalize
index d494dacaf..158694dc8 100755
--- a/cabalize
+++ b/cabalize
@@ -18,7 +18,7 @@ case "$ghc_version" in
6.4*)
BUILD_DEPENDS="${BUILD_DEPENDS} ${GHC64_DEPENDS}"
;;
-6.[56]*)
+6.[5-9]*)
BUILD_DEPENDS="${BUILD_DEPENDS} ${GHC66_DEPENDS}"
;;
*)
@@ -30,7 +30,8 @@ BUILD_DEPENDS=$(echo $BUILD_DEPENDS | sed -e 's# #, #g')
# Handle 'Hs-Source-Dir' option name which was deprecated in Cabal 1.1.4.
HS_SOURCE_DIRS='Hs-Source-Dirs'
-if ghc-pkg -l | grep -q '\<[Cc]abal-[0-1]\.[0-1]\.[0-3][^,]*'; then
+cabal_version=$(ghc-pkg -l | sed -ne 's/.*\<[Cc]abal-\([^,]*\).*/\1/p')
+if printf "$cabal_version\n1.1.4" | sort | tail -n 1 | grep -q '1\.1\.4'; then
HS_SOURCE_DIRS='Hs-Source-Dir'
fi