[project @ 1997-05-27 06:01:00 by sof]
[ghc-hetmet.git] / ghc / includes / Makefile
index d5335fa..cd5a8f2 100644 (file)
@@ -8,7 +8,7 @@ include $(TOP)/mk/boilerplate.mk
 #
 # Just to make sure, no ways stuff in here, please.
 #
-WAYS=
+override WAYS=
 
 # De-litted header files
 LH_FILES=$(wildcard *.lh)
@@ -55,6 +55,9 @@ $(H_CONFIG) :
        @echo >> $@
        @echo "#define $(HostOS_CPP)_HOST_OS            1" >> $@
        @echo "#define $(HostOS_CPP)_TARGET_OS          1" >> $@  
+       @echo "#ifndef $(HostPlaform_GNU)_TARGET_OS      " >> $@  
+       @echo "#define $(HostPlaform_GNU)_TARGET_OS     1" >> $@  
+       @echo "#endif                                    " >> $@  
        @echo "#define $(HostOS_CPP)_BUILD_OS           1" >> $@
        @echo >> $@
        @echo "#define $(HostVendor_CPP)_HOST_VENDOR    1" >> $@
@@ -90,16 +93,13 @@ boot :: all
 # Install all header files
 #
 # Hackily set the install destination here:
-INSTALL_DATAS += $(DELIT_H_FILES) $(H_FILES) $(TARGETPLATFORM).h
-
 #
-# We want the configuration header files for the different platforms
-# to be put inside the lib/../$(HOSTPLATFORM)/ directory 
+# Note: we keep per-platform copies of all the include files
+# (ditto for interface files). This is not *really* needed, but
+# it gives (perhaps) a cleaner binary dist structure..might change.
 #
-install :: $(H_CONFIG)
-       $(INSTALL_DIR) $(libdir)/includes
-       $(INSTALL_DATA) $(INSTALL_OPTS) $(H_CONFIG) $(libdir)/includes
-
+override datadir:=$(libdir)/includes
+INSTALL_DATAS += $(DELIT_H_FILES) $(H_FILES) $(TARGETPLATFORM).h $(H_CONFIG)
 
 #
 # `make clean' settings: