Refined filtering of config files. HighFidelityModel
authorJohan Groth <johang@symbian.org>
Mon, 13 Sep 2010 17:07:54 +0100
branchHighFidelityModel
changeset 413 9bcf6c827202
parent 411 d5d1e2d03163
child 414 f503e8553dd5
Refined filtering of config files.
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(<CPP>)
 		{
+		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,$_);