Changeset 32b4302 in mainline for tools/config.py
- Timestamp:
- 2019-08-18T19:06:02Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1c39d33b
- Parents:
- fa70134 (diff), 6c2fac18 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-18 19:06:02)
- git-committer:
- GitHub <noreply@…> (2019-08-18 19:06:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/config.py
rfa70134 r32b4302 43 43 44 44 ARGPOS_RULES = 1 45 ARGPOS_CHOICE = 2 46 ARGPOS_PRESET = 3 45 ARGPOS_PRESETS_DIR = 2 46 ARGPOS_CHOICE = 3 47 ARGPOS_PRESET = 4 48 ARGPOS_MASK_PLATFORM = 3 47 49 48 50 RULES_FILE = sys.argv[ARGPOS_RULES] 49 51 MAKEFILE = 'Makefile.config' 50 52 MACROS = 'config.h' 51 PRESETS_DIR = 'defaults'53 PRESETS_DIR = sys.argv[ARGPOS_PRESETS_DIR] 52 54 53 55 class BinaryOp: … … 536 538 537 539 try: 538 version = subprocess.Popen(['git', ' log', '-1', '--pretty=%h'], stdout = subprocess.PIPE).communicate()[0].decode().strip()540 version = subprocess.Popen(['git', '-C', os.path.dirname(RULES_FILE), 'log', '-1', '--pretty=%h'], stdout = subprocess.PIPE).communicate()[0].decode().strip() 539 541 sys.stderr.write("ok\n") 540 542 except: … … 689 691 else: 690 692 preset = None 693 694 mask_platform = (len(sys.argv) > ARGPOS_MASK_PLATFORM and sys.argv[ARGPOS_MASK_PLATFORM] == "--mask-platform") 691 695 692 696 # Input configuration file can be specified on command line … … 755 759 options = [] 756 760 opt2row = {} 757 cnt = 1 758 759 options.append(" --- Load preconfigured defaults ... ") 761 cnt = 0 762 763 if not mask_platform: 764 cnt += 1 765 options.append(" --- Load preconfigured defaults ... ") 760 766 761 767 for rule in rules: … … 764 770 if cond and not cond.evaluate(config): 765 771 continue 772 773 if mask_platform and (varname == "PLATFORM" or varname == "MACHINE" or varname == "COMPILER"): 774 rule = varname, vartype, "(locked) " + name, choices, cond 766 775 767 776 if varname == selname: … … 811 820 continue 812 821 813 if value == 0 :822 if value == 0 and not mask_platform: 814 823 profile = choose_profile(PRESETS_DIR, MAKEFILE, screen, config) 815 824 if profile != None: … … 828 837 else: 829 838 value = config[selname] 839 840 if mask_platform and (selname == "PLATFORM" or selname == "MACHINE" or selname == "COMPILER"): 841 continue 830 842 831 843 if seltype == 'choice':
Note:
See TracChangeset
for help on using the changeset viewer.