view ifndef_wrapper.sh @ 1521:198e2ee0f4b1

- Fix dependencies and remove old default_options.h from version control - Rename default_options.h.in -> default_options.h, and default_options.h -> default_options_guard.h - Fix newlines in default_options.h
author Matt Johnston <matt@ucc.asn.au>
date Mon, 19 Feb 2018 22:16:50 +0800
parents 750ec4ec4cbe
children 0196f4f83fee
line wrap: on
line source

#!/bin/sh

# Wrap all "#define X Y" with a #ifndef X...#endif"

sed -E 's/^( *#define ([^ ]+) .*)/#ifndef \2\
\1\
#endif/'