diff options
author | sof <unknown> | 2005-03-24 18:44:16 +0000 |
---|---|---|
committer | sof <unknown> | 2005-03-24 18:44:16 +0000 |
commit | c0cca2ea9d9b07c6af2da1a786e1a7bd4b757d0c (patch) | |
tree | 1b6f11e961c5e39dea231ac180b2a15aaa2c2041 /mk/package.mk | |
parent | 19519dc35bad5649226a9f7015eaabb154722e54 (diff) | |
download | haskell-c0cca2ea9d9b07c6af2da1a786e1a7bd4b757d0c.tar.gz |
[project @ 2005-03-24 18:44:16 by sof]
SRC_HC_OPTS: only add -ignore-package if supported by underlying GHC.
(reqd to be able to compile greencard/lib, hdirect/(com)lib with
non-cutting edge GHCen.)
Merge to STABLE.
Diffstat (limited to 'mk/package.mk')
-rw-r--r-- | mk/package.mk | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mk/package.mk b/mk/package.mk index d77eb33d7e..9e05818a76 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: package.mk,v 1.49 2005/03/03 21:01:49 wolfgang Exp $ +# $Id: package.mk,v 1.50 2005/03/24 18:44:16 sof Exp $ ifneq "$(PACKAGE)" "" @@ -161,7 +161,18 @@ endif SRC_HSC2HS_OPTS += -I. ifeq "$(NON_HS_PACKAGE)" "" +# Only use -ignore-package if supported by HC; i.e., ghc-6.3 and later. +# (Don't like the use of slow $(shell ..) in Makefiles, but can't see a way around it here.) +ifeq "$(STANDALONE_PACKAGE)" "NO" +SRC_HC_OPTS += -ignore-package $(PACKAGE) +else +ifneq "$(strip $(GHC))" "" +# Making the assumption here that standalone packages will be using mk/config.mk:GHC +SRC_HC_OPTS = $(shell if (test $(GhcCanonVersion) -ge 603); then echo "-ignore-package $(PACKAGE)"; fi) +else SRC_HC_OPTS += -ignore-package $(PACKAGE) +endif +endif SRC_HC_OPTS += $(GhcLibHcOpts) SRC_HC_OPTS += $(patsubst %, -package %, $(PACKAGE_DEPS)) endif |