git.iko.soy/typeable/pandoc
on master help sign in
Makefile: only use --with-hc-pkg if GHC_PKG is defined.

Note that Cabal will automatically choose the ghc-pkg appropriate for the compiler selected, so normally specifying GHC by itself is sufficient. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1217 788f1e2b-df1e-0410-8736-df70ead52e1b

commite361c5883d08b30b5ba53295a06892f187d82ed8 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 9 Feb 2008, 03:20 (19 years ago) parent446a964
1 file changed+6−2
Makefile+6−2
Makefile+6−2
@@ -67,7 +67,6 @@ INSTALL_PROGRAM := $(INSTALL) -m 755
6767INSTALL_DATA := $(INSTALL) -m 644
6868STRIP := strip
6969GHC ?= ghc
70−GHC_PKG ?= ghc-pkg
7170GHC_VERSION := $(shell $(GHC) --version | sed -e 's/[^0-9]*//')
7271
7372#-------------------------------------------------------------------------------
@@ -122,11 +121,16 @@ $(CABAL_BACKUP):
122121
123122.PHONY: configure
124123cleanup_files+=Setup.hi Setup.o $(BUILDCMD) $(BUILDVARS)
124+ifdef GHC_PKG
125+ hc_pkg = --with-hc-pkg=$(GHC_PKG)
126+else
127+ hc_pkg =
128+endif
125129configure: $(BUILDCONF)
126130$(BUILDCMD): Setup.hs
127131 $(GHC) -package Cabal Setup.hs -o $(BUILDCMD)
128132$(BUILDCONF): $(CABAL) $(CABAL_BACKUP) $(BUILDCMD)
129− $(BUILDCMD) configure --prefix=$(PREFIX) --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG)
133+ $(BUILDCMD) configure --prefix=$(PREFIX) --with-compiler=$(GHC) $(hc_pkg)
130134 @# Make configuration time settings persistent (definitely a hack).
131135 @echo "PREFIX?=$(PREFIX)" >$(BUILDVARS)
132136 @echo "DESTDIR?=$(DESTDIR)" >>$(BUILDVARS)