view ifndef_wrapper.sh @ 1750:7cb8bc5ce8b9

Don't sort objects, it breaks -lcrypt ordering
author Matt Johnston <matt@ucc.asn.au>
date Tue, 20 Oct 2020 23:33:45 +0800
parents 0196f4f83fee
children
line wrap: on
line source

#!/bin/sh

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

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