small updates
[ghc-hetmet.git] / ghc / driver / Makefile
index bdf9e6d..3a87ab4 100644 (file)
@@ -1,52 +1,28 @@
-#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.48 2000/12/11 10:18:51 simonmar Exp $
+# -----------------------------------------------------------------------------=
+# $Id: Makefile,v 1.76 2005/03/02 09:49:11 simonmar Exp $
+#
+# (c) The University of Glasgow 2002
 #
 
 TOP=..
-CURRENT_DIR=ghc/driver
 include $(TOP)/mk/boilerplate.mk
 
-ifeq "$(GhcWithHscBuiltViaC)" "YES"
-HC=$(GHC_INPLACE)
-endif
-
-ghc_407_at_least = $(shell expr "$(GhcMinVersion)" \>= 7)
-ifeq "$(ghc_407_at_least)" "1"
-ifneq "$(mingw32_TARGET_OS)" "1"
-SRC_HC_OPTS += -fglasgow-exts -cpp -package concurrent -package posix -package text
-else
-SRC_HC_OPTS += -fglasgow-exts -cpp -package concurrent -package text
-endif
-else
-SRC_HC_OPTS += -fglasgow-exts -cpp -syslib concurrent -syslib posix -syslib misc
-endif
-
-SUBDIRS = mangler split stats
-
-# -----------------------------------------------------------------------------
-# package configuration files...
-
-all :: package.conf package.conf.inplace
-
-pkgconf : Config.o Package.o PackageSrc.o Utils.o
-       $(HC) $(HC_OPTS) $(LD_OPTS) Config.o Package.o PackageSrc.o Utils.o -o pkgconf
-
-package.conf.inplace : pkgconf
-       ./pkgconf in-place >$@
-
-package.conf : pkgconf
-       ./pkgconf install >$@
+SUBDIRS = mangler split ghc ghci
 
-INSTALL_DATAS += package.conf
+boot all :: package.conf.inplace package.conf
 
-CLEAN_FILES += pkgconf package.conf.inplace package.conf
+package.conf.inplace :
+       echo "[]" > $@
 
-# -----------------------------------------------------------------------------
-# installation...
+package.conf :
+       echo "[]" > $@
 
-override datadir=$(libdir)
-INSTALL_DATAS += ghc-usage.txt
+override datadir = $(libdir)
+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*
 
 include $(TOP)/mk/target.mk