summaryrefslogtreecommitdiff
path: root/driver/Makefile
blob: e81b1ea1fad2e23a54fb1d5616dbb963d4f95eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -----------------------------------------------------------------------------=
# $Id: Makefile,v 1.76 2005/03/02 09:49:11 simonmar Exp $
#
# (c) The University of Glasgow 2002
#

TOP=..
include $(TOP)/mk/boilerplate.mk

SUBDIRS = mangler split ghc ghci

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

boot all ::
	$(MKDIRHIER) $(INPLACE_DATA_DIR)
	test -e $(INPLACE_PKG_CONF) || echo "[]" > $(INPLACE_PKG_CONF)
	echo "[]" > package.conf
	touch $(INPLACE_FILE)

INSTALL_DATAS += package.conf ghc-usage.txt ghci-usage.txt

# Since cleaning effectively uninstalls all the packages, we must 
# remove the stamp files that the build system uses to avoid unnecessarily
# re-installing packages.
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

include $(TOP)/mk/target.mk