include bindisttest in source distributions (fixes srcdist)
[ghc-hetmet.git] / Makefile
index 981fec0..7a62fa9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -199,6 +199,11 @@ install ::
 endif
 endif
 
+# Install gcc-extra-opts
+install ::
+       @$(INSTALL_DIR) $(libdir)
+       $(INSTALL_DATA) $(INSTALL_OPTS) extra-gcc-opts $(libdir)
+
 install-docs ::
        @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
        for i in $(SUBDIRS); do \
@@ -233,8 +238,6 @@ install-docs ::
 #      binary-dist is a GHC addition for binary distributions
 # 
 
-BIN_DIST_TARBALL=ghc-$(ProjectVersion)-$(TARGETPLATFORM).tar.bz2
-
 binary-dist::
        -rm -rf $(BIN_DIST_DIR)
        -$(RM) $(BIN_DIST_DIR).tar.gz
@@ -262,6 +265,7 @@ BIN_DIST_TOP= distrib/Makefile \
               ANNOUNCE \
               LICENSE \
               install-sh \
+             extra-gcc-opts.in \
               config.guess \
               config.sub   \
               aclocal.m4
@@ -277,7 +281,8 @@ binary-dist:: binary-dist-pre
 binary-dist-pre::
        $(MKDIRHIER) $(BIN_DIST_DIR)/mk
        echo 'include $$(TOP)/Makefile-vars' >  $(BIN_DIST_DIR)/mk/boilerplate.mk
-       echo 'include $$(TOP)/mk/install.mk' >  $(BIN_DIST_DIR)/mk/target.mk
+       echo 'include $$(TOP)/mk/package.mk' >  $(BIN_DIST_DIR)/mk/target.mk
+       echo 'include $$(TOP)/mk/install.mk' >> $(BIN_DIST_DIR)/mk/target.mk
        echo 'include $$(TOP)/mk/recurse.mk' >> $(BIN_DIST_DIR)/mk/target.mk
        echo ''                              >  $(BIN_DIST_DIR)/mk/compat.mk
        cp mk/package.mk $(BIN_DIST_DIR)/mk/
@@ -453,7 +458,7 @@ SRC_DIST_DIR=$(shell pwd)/$(SRC_DIST_NAME)
 #
 # Files to include in source distributions
 #
-SRC_DIST_DIRS += mk docs distrib $(filter-out docs distrib,$(SUBDIRS))
+SRC_DIST_DIRS += mk docs distrib bindisttest $(filter-out docs distrib,$(SUBDIRS))
 SRC_DIST_FILES += \
        configure.ac config.guess config.sub configure \
        aclocal.m4 README ANNOUNCE HACKING LICENSE Makefile install-sh \
@@ -557,6 +562,9 @@ MAINTAINER_CLEAN_FILES += VERSION
 extraclean::
        $(RM) -rf autom4te.cache
 
+clean distclean ::
+       $(MAKE) -C bindisttest $@
+
 # -----------------------------------------------------------------------------
 
 # Turn off target.mk's rules for 'all', 'boot' and 'install'.