More build system changes; ghc-pkg is now built with Cabal
[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 ghc 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         touch $(INPLACE_FILE)
21
22 override datadir = $(libdir)
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         $(INSTALL_DIR)                   $(BIN_DIST_DIR)/driver
32         $(INSTALL_DATA) Makefile         $(BIN_DIST_DIR)/driver
33         $(INSTALL_DATA) $(INSTALL_DATAS) $(BIN_DIST_DIR)/driver
34         set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d binary-dist; done
35
36 include $(TOP)/mk/target.mk