]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-config.awk
- up to 4.9.210
[packages/kernel.git] / kernel-config.awk
index 1a165fafe645993a4c4c5f3c18b710052c04bc88..9ac5a946b00117568d519758f1526ee61f09f207 100644 (file)
@@ -48,14 +48,14 @@ BEGIN {
                print "arch= must be specified" > "/dev/stderr"
                exit 1
        }
-       if ( ! basearch )
-               basearch = arch
-
-       targetLevel[ "all" ] = 1
-       targetLevel[ basearch ] = 2
-       targetLevel[ arch ] = 3
+       split( arch, Archs )
+       for (i = 1; i in Archs; i++) {
+               targetLevel[ Archs[ i ] ] = i
+       }
 
        shouldDie = 0
+
+       lastFile = ""
 }
 
 function dieLater( code ) {
@@ -63,6 +63,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:
@@ -78,6 +87,12 @@ function dieLater( code ) {
        next
 }
 
+!/^[A-Za-z0-9_]+(=|[ \t]+[A-Za-z0-9_-]+=)/ {
+       warn( "ERROR: Incorrect line: " $0 )
+       dieLater( 3 )
+       next
+}
+
 !/^CONFIG_/ {
        $0 = "CONFIG_" $0
 }
@@ -94,6 +109,7 @@ function dieLater( code ) {
                sub( "^" option, "", line )
                sub( /^[ \t]*/, "", line )
 
+               delete archs
                if ( line ~ /"/ ) {
                        # there can be white spaces
                        i = 0
This page took 0.106392 seconds and 4 git commands to generate.