From: simonmar Date: Tue, 23 Jul 2002 11:23:55 +0000 (+0000) Subject: [project @ 2002-07-23 11:23:55 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~1816 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=55079266f41957519f3749e4fe59ca50c071fb76;p=ghc-hetmet.git [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. --- diff --git a/mk/package.mk b/mk/package.mk index a43e29b..320c22a 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $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) == ""