summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/cleanup-header15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/cleanup-header b/tools/cleanup-header
new file mode 100644
index 000000000..44114a334
--- /dev/null
+++ b/tools/cleanup-header
@@ -0,0 +1,15 @@
+#!/bin/sed -f
+# Remove private parts from runtime include files, before installation
+# in /usr/local/lib/ocaml/caml
+
+/\/\* <include \.\.\/config\/m\.h> \*\// {
+ r ../config/m.h
+ d
+}
+/\/\* <include \.\.\/config\/s\.h> \*\// {
+ r ../config/s.h
+ d
+}
+/\/\* <private> \*\//, /\/\* <\/private> \*\//d
+
+