summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-02-09 03:20:48 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-02-09 03:20:48 +0000
commite361c5883d08b30b5ba53295a06892f187d82ed8 (patch)
tree77d91d6e21422ec52588cea55e34de1058975edf /Makefile
parent446a964a190edf094871cd4bb4b045e469446223 (diff)
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6b50546c2..6a152b192 100644
--- a/Makefile
+++ b/Makefile
@@ -67,7 +67,6 @@ INSTALL_PROGRAM := $(INSTALL) -m 755
INSTALL_DATA := $(INSTALL) -m 644
STRIP := strip
GHC ?= ghc
-GHC_PKG ?= ghc-pkg
GHC_VERSION := $(shell $(GHC) --version | sed -e 's/[^0-9]*//')
#-------------------------------------------------------------------------------
@@ -122,11 +121,16 @@ $(CABAL_BACKUP):
.PHONY: configure
cleanup_files+=Setup.hi Setup.o $(BUILDCMD) $(BUILDVARS)
+ifdef GHC_PKG
+ hc_pkg = --with-hc-pkg=$(GHC_PKG)
+else
+ hc_pkg =
+endif
configure: $(BUILDCONF)
$(BUILDCMD): Setup.hs
$(GHC) -package Cabal Setup.hs -o $(BUILDCMD)
$(BUILDCONF): $(CABAL) $(CABAL_BACKUP) $(BUILDCMD)
- $(BUILDCMD) configure --prefix=$(PREFIX) --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG)
+ $(BUILDCMD) configure --prefix=$(PREFIX) --with-compiler=$(GHC) $(hc_pkg)
@# Make configuration time settings persistent (definitely a hack).
@echo "PREFIX?=$(PREFIX)" >$(BUILDVARS)
@echo "DESTDIR?=$(DESTDIR)" >>$(BUILDVARS)