[project @ 2001-11-23 11:57:59 by simonmar]
[ghc-hetmet.git] / ghc / includes / Makefile
index fddd4d0..a6374e2 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.16 2001/10/03 13:57:42 simonmar Exp $
+# $Id: Makefile,v 1.18 2001/11/21 16:56:19 sof Exp $
 #
 
 TOP = ..
@@ -32,7 +32,10 @@ $(H_CONFIG) : $(FPTOOLS_TOP)/mk/config.h $(FPTOOLS_TOP)/mk/config.mk
 $(H_CONFIG) :
        @echo "Creating $@..."
        @$(RM) $@
-       @echo "#define HostPlatform_TYPE   $(HostPlatform_CPP)"  > $@
+       @echo "#ifndef __FPTOOLS_CONFIG_H__"  >$@
+       @echo "#define __FPTOOLS_CONFIG_H__" >>$@
+       @echo >> $@
+       @echo "#define HostPlatform_TYPE   $(HostPlatform_CPP)" >> $@
        @echo "#define TargetPlatform_TYPE $(HostPlatform_CPP)" >> $@
        @echo "#define BuildPlatform_TYPE  $(HostPlatform_CPP)" >> $@
        @echo >> $@
@@ -59,6 +62,7 @@ endif
        @echo "#define $(HostVendor_CPP)_TARGET_VENDOR  1" >> $@
        @echo "#define $(HostVendor_CPP)_BUILD_VENDOR   1" >> $@
        @cat $(FPTOOLS_TOP)/mk/$@ >> $@
+       @echo "#endif /* __FPTOOLS_CONFIG_H__ */"          >> $@
        @echo "Done."
 
 # ---------------------------------------------------------------------------
@@ -72,7 +76,7 @@ mkDerivedConstantsHdr : mkDerivedConstants.o
 DerivedConstants.h : mkDerivedConstantsHdr
        ./mkDerivedConstantsHdr >DerivedConstants.h
 
-CLEAN_FILES += DerivedConstants.h
+CLEAN_FILES += mkDerivedConstantsHdr DerivedConstants.h
 
 # ---------------------------------------------------------------------------
 # Make NativeDefs.h for the NCG
@@ -87,7 +91,7 @@ mkNativeHdr : mkNativeHdr.o
 NativeDefs.h : mkNativeHdr
        ./mkNativeHdr >NativeDefs.h
 
-CLEAN_FILES += NativeDefs.h
+CLEAN_FILES += mkNativeHdr NativeDefs.h
 
 # ---------------------------------------------------------------------------
 # boot setup: