]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- remember where each option was defined
authorsparky <sparky@pld-linux.org>
Sun, 28 Sep 2008 14:54:46 +0000 (14:54 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    kernel-config.awk -> 1.10
    kernel-track-config-change.awk -> 1.3

kernel-config.awk
kernel-track-config-change.awk

index 62d68c3afe394ce694ae71d8fca75de02ed7f22b..c5c7968639d66752de5f7e11bb091f32d632d0df 100644 (file)
@@ -56,6 +56,8 @@ BEGIN {
        targetLevel[ arch ] = 3
 
        shouldDie = 0
+
+       lastFile = ""
 }
 
 function dieLater( code ) {
@@ -63,6 +65,15 @@ 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:
index b7ee300fecb325591b0f45a654b55a4077ed79e2..b7a7847f013b7a58f65f9c1184c030c8aa2393b7 100644 (file)
@@ -6,17 +6,23 @@ BEGIN {
                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
                }
        }
 
@@ -49,7 +55,7 @@ BEGIN {
                #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++
                }
        }
This page took 0.064176 seconds and 4 git commands to generate.