Commit 55079266 authored by simonmar's avatar simonmar

[project @ 2002-07-23 11:23:55 by simonmar]

Don't re-run ghc-pkg if the package conf files haven't changed.  We
use a stamp file rather than adding an explicit dependency on
ghc/driver/package.conf{,.inplace} for reasons explained in a comment.
parent f34c83b2
# -----------------------------------------------------------------------------
# $Id: package.mk,v 1.16 2002/07/23 10:12:01 simonmar Exp $
# $Id: package.mk,v 1.17 2002/07/23 11:23:55 simonmar Exp $
ifneq "$(PACKAGE)" ""
......@@ -16,11 +16,24 @@ $(PACKAGE).conf.installed : $(PACKAGE).conf.in
$(CPP) $(RAWCPP_FLAGS) -I$(GHC_INCLUDE_DIR) -DINSTALLING -x c $(PACKAGE_CPP_OPTS) $< \
| sed 's/^#.*$$//g' >$@
boot all :: $(PACKAGE).conf.inplace $(PACKAGE).conf.installed
# 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
# boot' in multiple packages, make won't detect that the package
# configuration needs updating if it was updated already in the last
# second.
#
STAMP_PKG_CONF = stamp-pkg-conf
CLEAN_FILES += $(STAMP_PKG_CONF)
boot all :: $(STAMP_PKG_CONF)
$(STAMP_PKG_CONF) : $(PACKAGE).conf.inplace $(PACKAGE).conf.installed
$(GHC_PKG_INPLACE) --update-package <$(PACKAGE).conf.inplace
$(GHC_PKG_INPLACE) -f $(GHC_DRIVER_DIR)/package.conf --update-package <$(PACKAGE).conf.installed
@touch $(STAMP_PKG_CONF)
CLEAN_FILES += $(PACKAGE).conf.installed $(PACKAGE).conf.inplace
CLEAN_FILES += $(PACKAGE).conf.installed $(PACKAGE).conf.inplace
endif # $(way) == ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment