Changes in tools/config.py [3f1a481:aca97582] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/config.py

    r3f1a481 raca97582  
    4343
    4444ARGPOS_RULES = 1
    45 ARGPOS_PRESETS_DIR = 2
    46 ARGPOS_CHOICE = 3
    47 ARGPOS_PRESET = 4
    48 ARGPOS_MASK_PLATFORM = 3
     45ARGPOS_CHOICE = 2
     46ARGPOS_PRESET = 3
    4947
    5048RULES_FILE = sys.argv[ARGPOS_RULES]
    5149MAKEFILE = 'Makefile.config'
    5250MACROS = 'config.h'
    53 PRESETS_DIR = sys.argv[ARGPOS_PRESETS_DIR]
     51PRESETS_DIR = 'defaults'
    5452
    5553class BinaryOp:
     
    538536
    539537        try:
    540                 version = subprocess.Popen(['git', '-C', os.path.dirname(RULES_FILE), 'log', '-1', '--pretty=%h'], stdout = subprocess.PIPE).communicate()[0].decode().strip()
     538                version = subprocess.Popen(['git', 'log', '-1', '--pretty=%h'], stdout = subprocess.PIPE).communicate()[0].decode().strip()
    541539                sys.stderr.write("ok\n")
    542540        except:
     
    691689        else:
    692690                preset = None
    693 
    694         mask_platform = (len(sys.argv) > ARGPOS_MASK_PLATFORM and sys.argv[ARGPOS_MASK_PLATFORM] == "--mask-platform")
    695691
    696692        # Input configuration file can be specified on command line
     
    759755                        options = []
    760756                        opt2row = {}
    761                         cnt = 0
    762 
    763                         if not mask_platform:
    764                                 cnt += 1
    765                                 options.append("  --- Load preconfigured defaults ... ")
     757                        cnt = 1
     758
     759                        options.append("  --- Load preconfigured defaults ... ")
    766760
    767761                        for rule in rules:
     
    770764                                if cond and not cond.evaluate(config):
    771765                                        continue
    772 
    773                                 if mask_platform and (varname == "PLATFORM" or varname == "MACHINE" or varname == "COMPILER"):
    774                                         rule = varname, vartype, "(locked) " + name, choices, cond
    775766
    776767                                if varname == selname:
     
    820811                                        continue
    821812
    822                         if value == 0 and not mask_platform:
     813                        if value == 0:
    823814                                profile = choose_profile(PRESETS_DIR, MAKEFILE, screen, config)
    824815                                if profile != None:
     
    837828                        else:
    838829                                value = config[selname]
    839 
    840                         if mask_platform and (selname == "PLATFORM" or selname == "MACHINE" or selname == "COMPILER"):
    841                                         continue
    842830
    843831                        if seltype == 'choice':
Note: See TracChangeset for help on using the changeset viewer.