targetLevel[ arch ] = 3
shouldDie = 0
+
+ lastFile = ""
}
function dieLater( code ) {
shouldDie = code
}
+{
+ f = FILENAME
+ sub( /^.*\//, "", f ) # strip path
+ if ( f != lastFile ) {
+ print "\n# file: " f
+ lastFile = f
+ }
+}
+
# convert special case:
# # CONFIG_SOMETHING it not set
# to:
exit 1
}
+ file = ""
while ( getline < infile ) {
+ name = ""
if ( match( $0, /^# CONFIG_[A-Za-z0-9_]+ is not set$/ ) ) {
- optionArray[ $2 ] = "n";
+ name = $2
+ value = "n"
} else if ( match( $0, /^CONFIG_[A-Za-z0-9_]+=/ ) ) {
name = value = $1
sub( /=.*$/, "", name )
sub( /^[^=]*=/, "", value )
-
- optionArray[ name ] = value;
- continue
+ } else if ( match( $0, /^# file:/ ) ) {
+ file = $3
+ }
+ if ( length( name ) ) {
+ optionArray[ name ] = value
+ optionFile[ name ] = file
}
}
#print "Warning: new option " name " with value " value
} else {
if ( value != orig ) {
- print "ERROR: option " name " redefined from " orig " to " value
+ print "ERROR (" optionFile[ name ] "): option " name " redefined from " orig " to " value
foundErrors++
}
}