git.iko.soy/typeable/pandoc
on master help sign in
* 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

commitfe92360ea2dc3863d3c1bed816037f921706d343 authorroktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b> dateMon 30 Oct 2006, 05:40 (20 years ago) parentdb9cebd
2 files changed+5−4
Makefile+2−2 cabalize+3−2
Makefile+2−2
@@ -52,7 +52,7 @@ GHC_PKG := ghc-pkg
5252#-------------------------------------------------------------------------------
5353
5454.PHONY: all
55−all: build
55+all: $(BINS)
5656
5757.PHONY: templates
5858templates: $(SRCDIR)/templates
@@ -136,7 +136,7 @@ install-all: install-doc install-lib-doc
136136 destdir=$(DESTDIR); destdir=$${destdir:-/}; \
137137 $(BUILDCMD) copy --destdir=$$destdir; \
138138 $(BUILDCMD) register
139−uninstall-all: uninstall-doc uninstall-lib-doc
139+uninstall-all: uninstall-exec uninstall-doc uninstall-lib-doc
140140 -pkg_id="$(NAME)-$(VERSION)"; \
141141 libdir=$$($(GHC_PKG) field $$pkg_id library-dirs 2>/dev/null | \
142142 sed 's/^library-dirs: *//'); \
cabalize+3−2
@@ -18,7 +18,7 @@ case "$ghc_version" in
18186.4*)
1919 BUILD_DEPENDS="${BUILD_DEPENDS} ${GHC64_DEPENDS}"
2020 ;;
21−6.[56]*)
21+6.[5-9]*)
2222 BUILD_DEPENDS="${BUILD_DEPENDS} ${GHC66_DEPENDS}"
2323 ;;
2424*)
@@ -30,7 +30,8 @@ BUILD_DEPENDS=$(echo $BUILD_DEPENDS | sed -e 's# #, #g')
3030
3131# Handle 'Hs-Source-Dir' option name which was deprecated in Cabal 1.1.4.
3232HS_SOURCE_DIRS='Hs-Source-Dirs'
33−if ghc-pkg -l | grep -q '\<[Cc]abal-[0-1]\.[0-1]\.[0-3][^,]*'; then
33+cabal_version=$(ghc-pkg -l | sed -ne 's/.*\<[Cc]abal-\([^,]*\).*/\1/p')
34+if printf "$cabal_version\n1.1.4" | sort | tail -n 1 | grep -q '1\.1\.4'; then
3435 HS_SOURCE_DIRS='Hs-Source-Dir'
3536fi
3637