From c73eeb4c219de30504fe54f1a65bc2c229e69d26 Mon Sep 17 00:00:00 2001
From: sof <unknown>
Date: Mon, 9 Jun 1997 07:25:54 +0000
Subject: [PATCH] [project @ 1997-06-09 07:25:54 by sof] if needs be, define
 irix_TARGET_OS in config.h

---
 ghc/includes/Makefile | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/ghc/includes/Makefile b/ghc/includes/Makefile
index cd5a8f248220..6e8636e2a96a 100644
--- a/ghc/includes/Makefile
+++ b/ghc/includes/Makefile
@@ -31,6 +31,16 @@ ALL_FILES += $(TARGETPLATFORM).h
 endif
 
 
+#
+# In main/Signals we need to distinguish between irix5 and irix6,
+# so we suitably mangle HostOS_FULL to get at the major version.
+# (A hack, for sure - ToDo: consider systematically adding more
+# fine-grained OS info to this Makefile/configure soup )
+
+ifeq "$(HostOS_CPP)" "irix"
+IRIX_MAJOR = $(shell echo $(HostOS_Full) | sed 's/\(irix[^.]*\).*$$/\1/' )
+endif
+
 #
 # The fptools configure script creates the configuration header file 
 # and puts it in fptools/mk/config.h. We copy it down to here, prepending
@@ -55,10 +65,12 @@ $(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" >> $@
+ifeq "$(HostOS_CPP)" "irix"
+	@echo "#ifndef $(IRIX_MAJOR)_TARGET_OS		 " >> $@  
+	@echo "#define $(IRIX_MAJOR)_TARGET_OS		1" >> $@  
+	@echo "#endif					 " >> $@  
+endif
 	@echo >> $@
 	@echo "#define $(HostVendor_CPP)_HOST_VENDOR	1" >> $@
 	@echo "#define $(HostVendor_CPP)_TARGET_VENDOR  1" >> $@
-- 
GitLab