bindist fixes
[ghc-hetmet.git] / driver / Makefile
1 # -----------------------------------------------------------------------------=
2 # $Id: Makefile,v 1.76 2005/03/02 09:49:11 simonmar Exp $
3 #
4 # (c) The University of Glasgow 2002
5 #
6
7 TOP=..
8 include $(TOP)/mk/boilerplate.mk
9
10 SUBDIRS = mangler split ghci
11
12 INPLACE_DATA_DIR = $(FPTOOLS_TOP_ABS)/inplace-datadir
13 INPLACE_PKG_CONF = $(INPLACE_DATA_DIR)/package.conf
14 # Used to signal that we are inplace, as opposed to installed:
15 INPLACE_FILE     = $(INPLACE_DATA_DIR)/inplace
16
17 boot all ::
18         $(MKDIRHIER) $(INPLACE_DATA_DIR)
19         test -e $(INPLACE_PKG_CONF) || echo "[]" > $(INPLACE_PKG_CONF)
20         echo "[]" > package.conf
21         touch $(INPLACE_FILE)
22
23 INSTALL_DATAS += package.conf ghc-usage.txt ghci-usage.txt
24
25 # Since cleaning effectively uninstalls all the packages, we must 
26 # remove the stamp files that the build system uses to avoid unnecessarily
27 # re-installing packages.
28 CLEAN_FILES += package.conf* stamp-pkg-conf*
29
30 binary-dist:
31         for FILE in Makefile $(INSTALL_DATAS); do echo $(WHERE_AM_I)/$$FILE >> $(BIN_DIST_LIST); done
32         set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d binary-dist WHERE_AM_I=$(WHERE_AM_I)/$$d; done
33
34 include $(TOP)/mk/target.mk