configure.py
author Scott Ehlert <ds@alliedmods.net>
Sat Mar 23 23:12:16 2013 -0500 (2013-03-23)
changeset 821 b589eb17e403
parent 704 6055e296b807
child 870 004b1437bd14
permissions -rw-r--r--
Added --sdks option to configure script to specify which SDKs to build againt (bug 5676, r=psychonic).

Valid arguments are "all", "present", or a comma delimited list of engine names.

The "all" option will try to build against all supported SDKs. (This is the default.)
The "present" option will only attempt to build against SDKs that exist on the system.

Examples:

configure.py --sdks=css,csgo,ep2v
configure.py --sdks=l4d
configure.py -s present
ds@704
     1
# vim: set ts=2 sw=2 tw=99 noet:
ds@704
     2
import sys
ds@704
     3
import ambuild.runner as runner
ds@704
     4
ds@704
     5
run = runner.Runner()
ds@704
     6
run.options.add_option('--enable-debug', action='store_const', const='1', dest='debug',
ds@704
     7
                       help='Enable debugging symbols')
ds@704
     8
run.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
ds@704
     9
                       help='Enable optimization')
ds@821
    10
run.options.add_option('-s', '--sdks', default='all', dest='sdks',
ds@821
    11
                       help='Build against specified SDKs; valid args are "all", "present", or '
ds@821
    12
                            'comma-delimited list of engine names (default: %default)')
ds@704
    13
run.Configure(sys.path[0])