Changes in tools/config.py [3f1a481:aca97582] in mainline
- File:
-
- 1 edited
-
tools/config.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tools/config.py
r3f1a481 raca97582 43 43 44 44 ARGPOS_RULES = 1 45 ARGPOS_PRESETS_DIR = 2 46 ARGPOS_CHOICE = 3 47 ARGPOS_PRESET = 4 48 ARGPOS_MASK_PLATFORM = 3 45 ARGPOS_CHOICE = 2 46 ARGPOS_PRESET = 3 49 47 50 48 RULES_FILE = sys.argv[ARGPOS_RULES] 51 49 MAKEFILE = 'Makefile.config' 52 50 MACROS = 'config.h' 53 PRESETS_DIR = sys.argv[ARGPOS_PRESETS_DIR]51 PRESETS_DIR = 'defaults' 54 52 55 53 class BinaryOp: … … 538 536 539 537 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() 541 539 sys.stderr.write("ok\n") 542 540 except: … … 691 689 else: 692 690 preset = None 693 694 mask_platform = (len(sys.argv) > ARGPOS_MASK_PLATFORM and sys.argv[ARGPOS_MASK_PLATFORM] == "--mask-platform")695 691 696 692 # Input configuration file can be specified on command line … … 759 755 options = [] 760 756 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 ... ") 766 760 767 761 for rule in rules: … … 770 764 if cond and not cond.evaluate(config): 771 765 continue 772 773 if mask_platform and (varname == "PLATFORM" or varname == "MACHINE" or varname == "COMPILER"):774 rule = varname, vartype, "(locked) " + name, choices, cond775 766 776 767 if varname == selname: … … 820 811 continue 821 812 822 if value == 0 and not mask_platform:813 if value == 0: 823 814 profile = choose_profile(PRESETS_DIR, MAKEFILE, screen, config) 824 815 if profile != None: … … 837 828 else: 838 829 value = config[selname] 839 840 if mask_platform and (selname == "PLATFORM" or selname == "MACHINE" or selname == "COMPILER"):841 continue842 830 843 831 if seltype == 'choice':
Note:
See TracChangeset
for help on using the changeset viewer.
