diff ifndef_wrapper.sh @ 1295:750ec4ec4cbe

Convert #ifdef to #if, other build changes
author Matt Johnston <matt@ucc.asn.au>
date Wed, 04 May 2016 15:33:40 +0200
parents
children 198e2ee0f4b1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ifndef_wrapper.sh	Wed May 04 15:33:40 2016 +0200
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Wrap all "#define X Y" with a #ifndef X...#endif"
+
+sed -E 's/^(#define ([^ ]+) .*)/#ifndef \2\
+\1\
+#endif/'