Changeset f5211ee in mainline for tools/config.py


Ignore:
Timestamp:
2010-12-05T11:09:50Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
01e7043
Parents:
8c2b3ef (diff), 421250e (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.
Message:

Merge more of hands-off configuration support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/config.py

    r8c2b3ef rf5211ee  
    454454
    455455def main():
     456        cfgfile_in = None
    456457        config = {}
    457458        rules = []
     
    460461        parse_rules(RULES_FILE, rules)
    461462       
    462         # Read configuration from previous run
    463         if os.path.exists(MAKEFILE):
    464                 read_config(MAKEFILE, config)
     463        # Input configuration file can be specified on command line
     464        # otherwise configuration from previous run is used.
     465        if len(sys.argv) >= 4:
     466                cfgfile_in = sys.argv[3]
     467        else:
     468                cfgfile_in = MAKEFILE
     469       
     470        # Read configuration file
     471        if os.path.exists(cfgfile_in):
     472                read_config(cfgfile_in, config)
    465473       
    466474        # Default mode: only check values and regenerate configuration files
Note: See TracChangeset for help on using the changeset viewer.