diff options
author | simonmar <unknown> | 2004-01-23 13:37:40 +0000 |
---|---|---|
committer | simonmar <unknown> | 2004-01-23 13:37:40 +0000 |
commit | 4e6498f2129f2a5c976144b62038dc59b59af4d7 (patch) | |
tree | df24a149a442a169240b0e3b782843c52577345b /mk/package.mk | |
parent | c872dd3e96aeacfeff2c7e4f3991aa28cd6d4734 (diff) | |
download | haskell-4e6498f2129f2a5c976144b62038dc59b59af4d7.tar.gz |
[project @ 2004-01-23 13:37:40 by simonmar]
Some tweaks for standalone packages
Diffstat (limited to 'mk/package.mk')
-rw-r--r-- | mk/package.mk | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/mk/package.mk b/mk/package.mk index 665da7e320..2b3b32e5b4 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -1,13 +1,15 @@ # ----------------------------------------------------------------------------- -# $Id: package.mk,v 1.34 2004/01/09 12:43:37 simonmar Exp $ +# $Id: package.mk,v 1.35 2004/01/23 13:37:40 simonmar Exp $ ifneq "$(PACKAGE)" "" +ifeq "$(STANDALONE_PACKAGE)" "" ifeq "$(ProjectNameShort)" "ghc" STANDALONE_PACKAGE = NO else STANDALONE_PACKAGE = YES endif +endif # ----------------------------------------------------------------------------- # Build the package configuration file and tell the compiler about it. @@ -20,16 +22,13 @@ else PKGCONF_CPP_EXTRA_OPTS = endif -ifeq "$(STANDALONE_PACKAGE)" "NO" package.conf.inplace : package.conf.in - $(CPP) $(RAWCPP_FLAGS) $(PKGCONF_CPP_EXTRA_OPTS) -x c $(PACKAGE_CPP_OPTS) $< \ - | sed 's/^#.*$$//g' >$@ + $(CPP) $(RAWCPP_FLAGS) -P $(PKGCONF_CPP_EXTRA_OPTS) -x c $(PACKAGE_CPP_OPTS) $< | \ + sed -e 's/""//g' -e 's/, ]/ ]/g' >$@ package.conf.installed : package.conf.in - $(CPP) $(RAWCPP_FLAGS) $(PKGCONF_CPP_EXTRA_OPTS) -DINSTALLING -x c $(PACKAGE_CPP_OPTS) $< \ - | sed 's/^#.*$$//g' >$@ - -endif + $(CPP) $(RAWCPP_FLAGS) -P $(PKGCONF_CPP_EXTRA_OPTS) -DINSTALLING -x c $(PACKAGE_CPP_OPTS) $< | \ + sed -e 's/""//g' -e 's/, ]/ ]/g' >$@ # we could be more accurate here and add a dependency on # ghc/driver/package.conf, but that doesn't work too well because of @@ -64,15 +63,18 @@ PACKAGE_CPP_OPTS += -DPACKAGE=\"${PACKAGE}\" PACKAGE_CPP_OPTS += -DPACKAGE_DEPS='$(patsubst %,"%"$(comma),$(PACKAGE_DEPS))' PACKAGE_CPP_OPTS += -DLIBRARY=\"HS$(PACKAGE)\" PACKAGE_CPP_OPTS += -DLIBDIR=\"$(libdir)\" +PACKAGE_CPP_OPTS += -DFPTOOLS_TOP_ABS=\"${FPTOOLS_TOP_ABS}\" # Let the package configuration file refer to $(libdir) as # ${pkglibdir}. Note we can't use ${libdir} because ghc-pkg already # redefines it to point to GHC's libdir (bug or feature?). # -install :: package.conf.in - $(CPP) $(RAWCPP_FLAGS) $(PKGCONF_CPP_EXTRA_OPTS) -DINSTALLING -x c $(PACKAGE_CPP_OPTS) $< \ - | sed -e 's/^#.*$$//g' -e 's/""//g' -e 's/, ]/ ]/g' \ - | $(GHC_PKG) --force --update-package +install :: package.conf.installed + $(GHC_PKG) --force --update-package <package.conf.installed + +# Invoke this rule by hand in order to use the package in-place +install-inplace-pkg : package.conf.inplace + $(GHC_PKG) --force --update-package <package.conf.inplace endif # $(STANDALONE_PACKAGE) |