X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=driver%2FMakefile;h=7953d5f353f1f8efa27b91cf22431ba8d33b212c;hb=ce5560e4c105456248b75f5928e39f6ce81ddd37;hp=a8352090c163384452d5e8ffaaab1343e5ae9f46;hpb=79b5a2cb4b9ed5fe41a05fa2ec98bd1f83971daf;p=ghc-hetmet.git diff --git a/driver/Makefile b/driver/Makefile index a835209..7953d5f 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -7,17 +7,18 @@ TOP=.. include $(TOP)/mk/boilerplate.mk -SUBDIRS = mangler split ghc ghci +SUBDIRS = mangler split ghci -boot all :: package.conf.inplace package.conf +INPLACE_DATA_DIR = $(FPTOOLS_TOP_ABS)/inplace-datadir +INPLACE_PKG_CONF = $(INPLACE_DATA_DIR)/package.conf +# Used to signal that we are inplace, as opposed to installed: +INPLACE_FILE = $(INPLACE_DATA_DIR)/inplace -package.conf.inplace : - echo "[]" > $@ +boot all :: + $(MKDIRHIER) $(INPLACE_DATA_DIR) + test -e $(INPLACE_PKG_CONF) || echo "[]" > $(INPLACE_PKG_CONF) + touch $(INPLACE_FILE) -package.conf : - echo "[]" > $@ - -override datadir = $(libdir) INSTALL_DATAS += package.conf ghc-usage.txt ghci-usage.txt # Since cleaning effectively uninstalls all the packages, we must @@ -26,9 +27,7 @@ INSTALL_DATAS += package.conf ghc-usage.txt ghci-usage.txt CLEAN_FILES += package.conf* stamp-pkg-conf* binary-dist: - $(INSTALL_DIR) $(BIN_DIST_DIR)/driver - $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/driver - $(INSTALL_DATA) $(INSTALL_DATAS) $(BIN_DIST_DIR)/driver - set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d binary-dist; done + for FILE in Makefile $(INSTALL_DATAS); do echo $(WHERE_AM_I)/$$FILE >> $(BIN_DIST_LIST); done + set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d binary-dist WHERE_AM_I=$(WHERE_AM_I)/$$d; done include $(TOP)/mk/target.mk