projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2003-07-24 07:45:09 by simonpj]
[ghc-hetmet.git]
/
mk
/
package.mk
diff --git
a/mk/package.mk
b/mk/package.mk
index
5a3f433
..
00c4840
100644
(file)
--- a/
mk/package.mk
+++ b/
mk/package.mk
@@
-1,5
+1,5
@@
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
-# $Id: package.mk,v 1.27 2003/05/23 10:00:04 simonmar Exp $
+# $Id: package.mk,v 1.30 2003/06/04 12:37:09 reid Exp $
ifneq "$(PACKAGE)" ""
ifneq "$(PACKAGE)" ""
@@
-24,12
+24,13
@@
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' >$@
package.conf.inplace : package.conf.in
$(CPP) $(RAWCPP_FLAGS) $(PKGCONF_CPP_EXTRA_OPTS) -x c $(PACKAGE_CPP_OPTS) $< \
| sed 's/^#.*$$//g' >$@
-endif
package.conf.installed : package.conf.in
$(CPP) $(RAWCPP_FLAGS) $(PKGCONF_CPP_EXTRA_OPTS) -DINSTALLING -x c $(PACKAGE_CPP_OPTS) $< \
| sed '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
+
# we could be more accurate here and add a dependency on
# ghc/driver/package.conf, but that doesn't work too well because of
# make's limited accuracy with modification times: when doing 'make
# we could be more accurate here and add a dependency on
# ghc/driver/package.conf, but that doesn't work too well because of
# make's limited accuracy with modification times: when doing 'make
@@
-59,12
+60,19
@@
CLEAN_FILES += package.conf.installed package.conf.inplace
else # $(STANDALONE_PACKAGE) == "YES"
else # $(STANDALONE_PACKAGE) == "YES"
+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)\"
+
# 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?).
#
# 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.installed
- pkglibdir=$(libdir) $(GHC_PKG) --update-package <package.conf.installed
+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
endif # $(STANDALONE_PACKAGE)
endif # $(STANDALONE_PACKAGE)
@@
-224,6
+232,8
@@
$(HTML_DOC) : $(HS_PPS)
$(foreach pkg, $(PACKAGE_DEPS), \
--read-interface=../$(pkg),../$(pkg)/$(pkg).haddock)
$(foreach pkg, $(PACKAGE_DEPS), \
--read-interface=../$(pkg),../$(pkg)/$(pkg).haddock)
+CLEAN_FILES += $(PACKAGE).haddock
+
%.raw-hs : %.lhs
$(GHC) $(HC_OPTS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@
%.raw-hs : %.lhs
$(GHC) $(HC_OPTS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@