]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- make output-config optional (defaults to input-config)
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 29 Jan 2008 13:48:30 +0000 (13:48 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- allow inline symbols (for current arch)

Changed files:
    kernel-config.py -> 1.10

kernel-config.py

index d731e23fb753bbdb91db5ff52a95d93f418f5f56..f15f6e98485234b7c3f15c7af921807c4c14c232 100644 (file)
@@ -6,14 +6,18 @@
 import sys
 import re
 
-if len(sys.argv) != 5:
-    print "Usage: %s target_arch kernel.conf input-config output-config" % sys.argv[0]
+argc = len(sys.argv)
+if argc < 4 or argc > 5:
+    print "Usage: %s target_arch kernel.conf input-config [output-config]" % sys.argv[0]
     sys.exit(1)
 
 arch = sys.argv[1]
 kernelconfig = sys.argv[2]
 inconfig = sys.argv[3]
-outconfig = sys.argv[4]
+if argc == 5:
+    outconfig = sys.argv[4]
+else:
+    outconfig = inconfig
 
 from UserDict import UserDict
 
@@ -94,6 +98,12 @@ for l in f:
         rc = 1
         continue
 
+    # inline symbols: for current arch, duplicates allowed
+    if symbol.find('=') >= 0:
+        (symbol, value) = symbol.split('=')
+        dict[symbol] = value
+        continue
+
     hash = {}
     for item in c[1:]:
         try:
This page took 1.807255 seconds and 4 git commands to generate.