Changeset e3c3172 in mainline


Ignore:
Timestamp:
2010-12-06T12:40:37Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bea023b9
Parents:
d40ffbb
Message:

introduce a true hands-off configuration/build mode
(use "make PROFILE≤profile_name> HANDS_OFF=y")

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rd40ffbb re3c3172  
    6666
    6767config_default: $(CONFIG_RULES)
     68ifeq ($(HANDS_OFF),y)
     69        $(CONFIG) $< hands-off $(PROFILE)
     70else
    6871        $(CONFIG) $< default $(PROFILE)
     72endif
    6973
    7074config: $(CONFIG_RULES)
  • tools/config.py

    rd40ffbb re3c3172  
    495495                read_config(MAKEFILE, config)
    496496       
    497         # Default mode: only check values and regenerate configuration files
     497        # Default mode: check values and regenerate configuration files
    498498        if (len(sys.argv) >= 3) and (sys.argv[2] == 'default'):
    499499                if (infer_verify_choices(config, rules)):
    500500                        create_output(MAKEFILE, MACROS, config, rules)
    501501                        return 0
     502       
     503        # Hands-off mode: check values and regenerate configuration files,
     504        # but no interactive fallback
     505        if (len(sys.argv) >= 3) and (sys.argv[2] == 'hands-off'):
     506                # We deliberately test sys.argv >= 4 because we do not want
     507                # to read implicitly any possible previous run configuration
     508                if len(sys.argv) < 4:
     509                        sys.stderr.write("Configuration error: No presets specified\n")
     510                        return 2
     511               
     512                if (infer_verify_choices(config, rules)):
     513                        create_output(MAKEFILE, MACROS, config, rules)
     514                        return 0
     515               
     516                sys.stderr.write("Configuration error: The presets are ambiguous\n")
     517                return 1
    502518       
    503519        # Check mode: only check configuration
Note: See TracChangeset for help on using the changeset viewer.