From e361c5883d08b30b5ba53295a06892f187d82ed8 Mon Sep 17 00:00:00 2001 From: fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> Date: Sat, 9 Feb 2008 03:20:48 +0000 Subject: [PATCH] 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 --- Makefile | 8 ++++++-- 1 file 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)