File 0237-Add-runtime_tools-include-to-tertiary-bootstrap.patch of Package erlang

From e30bbbec1c4a73f2bbf633a67ab2a9ef85845729 Mon Sep 17 00:00:00 2001
From: Siri Hansen <siri@erlang.org>
Date: Wed, 20 Dec 2017 13:35:46 +0100
Subject: [PATCH 1/2] Add runtime_tools/include to tertiary bootstrap

---
 .gitignore  |  1 +
 Makefile.in | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/Makefile.in b/Makefile.in
index 3dce72ba78..67eec53ca0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -679,6 +679,8 @@ tertiary_bootstrap_copy:
 	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; fi
 	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/common_test ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/common_test ; fi
 	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/common_test/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/common_test/include ; fi
+	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/runtime_tools ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/runtime_tools ; fi
+	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/runtime_tools/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/runtime_tools/include ; fi
 	$(V_at)for x in lib/ic/ebin/*.beam; do \
 		BN=`basename $$x`; \
 		TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin/$$BN; \
@@ -767,6 +769,18 @@ tertiary_bootstrap_copy:
 			cp $$x $$TF; \
 		true; \
 	done
+
+#	copy runtime_tool includes to be able to compile with include_lib
+	$(V_at)for x in lib/runtime_tools/include/*.hrl; do \
+		BN=`basename $$x`; \
+		TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/runtime_tools/include/$$BN; \
+		test -f  $$TF && \
+		test '!' -z "`find $$x -newer $$TF -print`" && \
+			cp $$x $$TF; \
+		test '!' -f $$TF && \
+			cp $$x $$TF; \
+		true; \
+	done
 #	$(V_at)cp lib/syntax_tools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin
 
 doc_bootstrap_build:
-- 
2.15.1

openSUSE Build Service is sponsored by