Install the RTS from a bindist correctly
[ghc-hetmet.git] / includes / Makefile
index cfb2a48..4b89d52 100644 (file)
@@ -4,9 +4,17 @@ TOP = ..
 include $(TOP)/mk/boilerplate.mk
 
 #
+# Header files built from the configure script's findings
+#
+H_CONFIG   = ghcautoconf.h
+H_PLATFORM = ghcplatform.h
+
+#
 # All header files
 #
-H_FILES = $(filter-out gmp.h,$(wildcard *.h)) gmp.h
+H_FILES = $(filter-out gmp.h $(H_CONFIG) $(H_PLATFORM),$(wildcard *.h)) gmp.h
+
+ifneq "$(DOING_BIN_DIST)" "YES"
 
 #
 # Options
@@ -25,12 +33,6 @@ ifneq "$(GhcWithSMP)" "YES"
 SRC_CC_OPTS += -DNOSMP
 endif
 
-#
-# Header file built from the configure script's findings
-#
-H_CONFIG   = ghcautoconf.h
-H_PLATFORM = ghcplatform.h
-
 boot :: gmp.h
 
 all :: $(H_CONFIG) $(H_PLATFORM)
@@ -160,6 +162,8 @@ endif
 
 CLEAN_FILES += mkGHCConstants$(exeext) GHCConstants.h
 
+endif
+
 # ---------------------------------------------------------------------------
 # boot setup:
 #
@@ -175,6 +179,11 @@ CLEAN_FILES += mkGHCConstants$(exeext) GHCConstants.h
 override datadir:=$(libdir)/include
 INSTALL_DATAS += $(H_FILES) $(H_CONFIG) $(H_PLATFORM)
 
+binary-dist:
+       $(INSTALL_DIR)                   $(BIN_DIST_DIR)/includes
+       $(INSTALL_DATA) Makefile         $(BIN_DIST_DIR)/includes/
+       $(INSTALL_DATA) $(INSTALL_DATAS) $(BIN_DIST_DIR)/includes/
+
 #
 # `make clean' settings:
 #