needed utilities for configure
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 2 Dec 2004 16:04:30 +0000 (16:04 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 2 Dec 2004 16:04:30 +0000 (16:04 +0000)
[r4540]

filter.awk [new file with mode: 0644]
filter.sed [new file with mode: 0644]

diff --git a/filter.awk b/filter.awk
new file mode 100644 (file)
index 0000000..fdef9f0
--- /dev/null
@@ -0,0 +1,9 @@
+BEGIN           { output = 0
+                 print "#ifndef _FIRM_CONFIG_H"
+                 print "#define _FIRM_CONFIG_H"
+                 print "/* This file was automtically generated from libFirm's configure */"
+                }
+/snap,[ ]*snap/ { output = 0; NEXT }
+                { if (output) print }
+/snip,[ ]*snip/ { output = 1 }
+END             { print "#endif /* _FIRM_CONFIG_H */\n" }
diff --git a/filter.sed b/filter.sed
new file mode 100644 (file)
index 0000000..92332fc
--- /dev/null
@@ -0,0 +1,4 @@
+s/#undef  *\([A-Za-z][A-Za-z_]*\)/#undef \1/
+s/#define  *\([A-Za-z][A-Za-z_]*\)\(.*\)/#ifndef \1 \
+#define \1 \2 \
+#endif/