The spec says that unifdefall removes all #ifs, and this now requires

the -k flag to unifdef.
This commit is contained in:
Tony Finch 2002-09-24 19:50:03 +00:00
parent 981dbf5bac
commit 36076c1e7b

View File

@ -2,7 +2,7 @@
#
# remove all the #if's from a source file
#
# $dotat: things/unifdefall.sh,v 1.8 2002/05/15 10:31:20 fanf Exp $
# $dotat: things/unifdefall.sh,v 1.9 2002/09/24 19:43:57 fanf2 Exp $
# $FreeBSD$
set -e
@ -17,7 +17,7 @@ sed -Ee 's/^([A-Za-z0-9_]+).*$/\1/' $tmp/hashdefs > $tmp/alldef
comm -23 $tmp/ctrl $tmp/alldef > $tmp/undef
comm -12 $tmp/ctrl $tmp/alldef > $tmp/def
echo unifdef \\ > $tmp/cmd
echo unifdef -k \\ > $tmp/cmd
sed -Ee 's/^(.*)$/-U\1 \\/' $tmp/undef >> $tmp/cmd
while read sym
do sed -Ee '/^('"$sym"')([(][^)]*[)])?([ ]+(.*))?$/!d;s//-D\1=\4/' $tmp/hashdefs