# HG changeset patch # User Johan Groth # Date 1284394074 -3600 # Node ID 9bcf6c827202bbc26ad793322a80460410e81220 # Parent d5d1e2d03163979f55d9a325cb1824575ee6e801 Refined filtering of config files. diff -r d5d1e2d03163 -r 9bcf6c827202 sysdeftools/joinsysdef.pl --- a/sysdeftools/joinsysdef.pl Fri Sep 10 14:37:00 2010 +0100 +++ b/sysdeftools/joinsysdef.pl Mon Sep 13 17:07:54 2010 +0100 @@ -769,17 +769,18 @@ sub getDefines { # populate the list of #defines from a specified .hrh file. my $file = shift; - my $inc; + my $inc = ''; foreach my $i (@includes) { $inc.=" -I$i"; } - open(CPP,"cpp -dD$inc \"$file\"|"); + open(CPP,"cpp -dD$inc \"$file\" 2>&1 |"); while() { + s/\s+$//; if(!/\S/){next} # skip blank lines if(/^# [0-9]+ /) {next} # don't care about these - s/\s+$//; + if(/#undef/) { next } # don't care about these if(s/^#define\s+(\S+)\((.*?)\)\s+//) { #parametered define push(@{$defineParams{$1}},@2,$_);