summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/develop.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/indra/develop.py b/indra/develop.py
index 3c88bb8a01..36c947327a 100755
--- a/indra/develop.py
+++ b/indra/develop.py
@@ -742,9 +742,10 @@ Options:
-p | --project=NAME set the root project name. (Doesn't effect makefiles)
Commands:
- build configure and build default target
- clean delete all build directories, does not affect sources
- configure configure project by running cmake (default command if none given)
+ build configure and build default target
+ clean delete all build directories, does not affect sources
+ configure configure project by running cmake (default if none given)
+ printbuilddirs print the build directory that will be used
Command-options for "configure":
We use cmake variables to change the build configuration.
@@ -762,15 +763,6 @@ Examples:
'''
def main(arguments):
- if os.getenv('DISTCC_DIR') is None:
- distcc_dir = os.path.join(getcwd(), '.distcc')
- if not os.path.exists(distcc_dir):
- os.mkdir(distcc_dir)
- print "setting DISTCC_DIR to %s" % distcc_dir
- os.environ['DISTCC_DIR'] = distcc_dir
- else:
- print "DISTCC_DIR is set to %s" % os.getenv('DISTCC_DIR')
-
setup = setup_platform[sys.platform]()
try:
opts, args = getopt.getopt(
@@ -832,6 +824,14 @@ For example: develop.py configure -DSERVER:BOOL=OFF"""
if cmd in ('cmake', 'configure'):
setup.run_cmake(args)
elif cmd == 'build':
+ if os.getenv('DISTCC_DIR') is None:
+ distcc_dir = os.path.join(getcwd(), '.distcc')
+ if not os.path.exists(distcc_dir):
+ os.mkdir(distcc_dir)
+ print "setting DISTCC_DIR to %s" % distcc_dir
+ os.environ['DISTCC_DIR'] = distcc_dir
+ else:
+ print "DISTCC_DIR is set to %s" % os.getenv('DISTCC_DIR')
for d in setup.build_dirs():
if not os.path.exists(d):
raise CommandError('run "develop.py cmake" first')
@@ -842,6 +842,9 @@ For example: develop.py configure -DSERVER:BOOL=OFF"""
if args:
raise CommandError('clean takes no arguments')
setup.cleanup()
+ elif cmd == 'printbuilddirs':
+ for d in setup.build_dirs():
+ print >> sys.stdout, d
else:
print >> sys.stderr, 'Error: unknown subcommand', repr(cmd)
print >> sys.stderr, "(run 'develop.py --help' for help)"