aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/develop.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xlinden/indra/develop.py31
1 files changed, 24 insertions, 7 deletions
diff --git a/linden/indra/develop.py b/linden/indra/develop.py
index af633b2..f4fa1cc 100755
--- a/linden/indra/develop.py
+++ b/linden/indra/develop.py
@@ -77,7 +77,7 @@ class PlatformSetup(object):
77 standalone = 'OFF' 77 standalone = 'OFF'
78 unattended = 'OFF' 78 unattended = 'OFF'
79 universal = 'OFF' 79 universal = 'OFF'
80 project_name = 'Imprudence' 80 project_name = 'meta-impy'
81 distcc = True 81 distcc = True
82 cmake_opts = [] 82 cmake_opts = []
83 using_express = False 83 using_express = False
@@ -380,24 +380,32 @@ class LinuxSetup(UnixSetup):
380 cpus += m and int(m.group(1)) or 1 380 cpus += m and int(m.group(1)) or 1
381 return hosts, cpus 381 return hosts, cpus
382 382
383 def mk_distcc_hosts(): 383 def mk_distcc_hosts(basename, range, num_cpus):
384 '''Generate a list of LL-internal machines to build on.''' 384 '''Generate a list of LL-internal machines to build on.'''
385 loc_entry, cpus = localhost() 385 loc_entry, cpus = localhost()
386 hosts = [loc_entry] 386 hosts = [loc_entry]
387 dead = [] 387 dead = []
388 stations = [s for s in xrange(36) if s not in dead] 388 stations = [s for s in xrange(range) if s not in dead]
389 random.shuffle(stations) 389 random.shuffle(stations)
390 hosts += ['station%d.lindenlab.com/2,lzo' % s for s in stations] 390 hosts += ['station%d.lindenlab.com/2,lzo' % s for s in stations]
391 hosts += ['%s%d.lindenlab.com/%d,lzo' % (basename, s, num_cpus) for s in stations]
391 cpus += 2 * len(stations) 392 cpus += 2 * len(stations)
392 return ' '.join(hosts), cpus 393 return ' '.join(hosts), cpus
393 394
394 if job_count is None: 395 if job_count is None:
395 hosts, job_count = count_distcc_hosts() 396 hosts, job_count = count_distcc_hosts()
396 if hosts == 1 and socket.gethostname().startswith('station'): 397 if hosts == 1:
397 hosts, job_count = mk_distcc_hosts() 398 hostname = socket.gethostname()
398 os.putenv('DISTCC_HOSTS', hosts) 399 if hostname.startswith('station'):
400 hosts, job_count = mk_distcc_hosts('station', 36, 2)
401 os.environ['DISTCC_HOSTS'] = hosts
402 if hostname.startswith('eniac'):
403 hosts, job_count = mk_distcc_hosts('eniac', 71, 2)
404 os.environ['DISTCC_HOSTS'] = hosts
399 opts.extend(['-j', str(job_count)]) 405 opts.extend(['-j', str(job_count)])
400 406
407 '''opts.extend(['-j', str(2)])'''
408
401 if targets: 409 if targets:
402 targets = ' '.join(targets) 410 targets = ' '.join(targets)
403 else: 411 else:
@@ -706,7 +714,7 @@ Usage: develop.py [options] [command [command-options]]
706 714
707Options: 715Options:
708 -h | --help print this help message 716 -h | --help print this help message
709 --standalone build standalone, without Linden prebuild libraries 717 --standalone build standalone, without prebuild libraries
710 --unattended build unattended, do not invoke any tools requiring 718 --unattended build unattended, do not invoke any tools requiring
711 a human response 719 a human response
712 --universal build a universal binary on Mac OS X (unsupported) 720 --universal build a universal binary on Mac OS X (unsupported)
@@ -742,6 +750,15 @@ Examples:
742''' 750'''
743 751
744def main(arguments): 752def main(arguments):
753 if os.getenv('DISTCC_DIR') is None:
754 distcc_dir = os.path.join(getcwd(), '.distcc')
755 if not os.path.exists(distcc_dir):
756 os.mkdir(distcc_dir)
757 print "setting DISTCC_DIR to %s" % distcc_dir
758 os.environ['DISTCC_DIR'] = distcc_dir
759 else:
760 print "DISTCC_DIR is set to %s" % os.getenv('DISTCC_DIR')
761
745 setup = setup_platform[sys.platform]() 762 setup = setup_platform[sys.platform]()
746 try: 763 try:
747 opts, args = getopt.getopt( 764 opts, args = getopt.getopt(