diff options
Diffstat (limited to '')
-rwxr-xr-x | linden/indra/develop.py | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/linden/indra/develop.py b/linden/indra/develop.py index e804374..a705719 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 | 83 | ||
@@ -367,24 +367,32 @@ class LinuxSetup(UnixSetup): | |||
367 | cpus += m and int(m.group(1)) or 1 | 367 | cpus += m and int(m.group(1)) or 1 |
368 | return hosts, cpus | 368 | return hosts, cpus |
369 | 369 | ||
370 | def mk_distcc_hosts(): | 370 | def mk_distcc_hosts(basename, range, num_cpus): |
371 | '''Generate a list of LL-internal machines to build on.''' | 371 | '''Generate a list of LL-internal machines to build on.''' |
372 | loc_entry, cpus = localhost() | 372 | loc_entry, cpus = localhost() |
373 | hosts = [loc_entry] | 373 | hosts = [loc_entry] |
374 | dead = [] | 374 | dead = [] |
375 | stations = [s for s in xrange(36) if s not in dead] | 375 | stations = [s for s in xrange(range) if s not in dead] |
376 | random.shuffle(stations) | 376 | random.shuffle(stations) |
377 | hosts += ['station%d.lindenlab.com/2,lzo' % s for s in stations] | 377 | hosts += ['station%d.lindenlab.com/2,lzo' % s for s in stations] |
378 | hosts += ['%s%d.lindenlab.com/%d,lzo' % (basename, s, num_cpus) for s in stations] | ||
378 | cpus += 2 * len(stations) | 379 | cpus += 2 * len(stations) |
379 | return ' '.join(hosts), cpus | 380 | return ' '.join(hosts), cpus |
380 | 381 | ||
381 | if job_count is None: | 382 | if job_count is None: |
382 | hosts, job_count = count_distcc_hosts() | 383 | hosts, job_count = count_distcc_hosts() |
383 | if hosts == 1 and socket.gethostname().startswith('station'): | 384 | if hosts == 1: |
384 | hosts, job_count = mk_distcc_hosts() | 385 | hostname = socket.gethostname() |
385 | os.putenv('DISTCC_HOSTS', hosts) | 386 | if hostname.startswith('station'): |
387 | hosts, job_count = mk_distcc_hosts('station', 36, 2) | ||
388 | os.environ['DISTCC_HOSTS'] = hosts | ||
389 | if hostname.startswith('eniac'): | ||
390 | hosts, job_count = mk_distcc_hosts('eniac', 71, 2) | ||
391 | os.environ['DISTCC_HOSTS'] = hosts | ||
386 | opts.extend(['-j', str(job_count)]) | 392 | opts.extend(['-j', str(job_count)]) |
387 | 393 | ||
394 | '''opts.extend(['-j', str(2)])''' | ||
395 | |||
388 | if targets: | 396 | if targets: |
389 | targets = ' '.join(targets) | 397 | targets = ' '.join(targets) |
390 | else: | 398 | else: |
@@ -632,9 +640,9 @@ class WindowsSetup(PlatformSetup): | |||
632 | continue | 640 | continue |
633 | vstool_cmd = (os.path.join('tools','vstool','VSTool.exe') + | 641 | vstool_cmd = (os.path.join('tools','vstool','VSTool.exe') + |
634 | ' --solution ' + | 642 | ' --solution ' + |
635 | os.path.join(build_dir,'Imprudence.sln') + | 643 | os.path.join(build_dir,'meta-impy.sln') + |
636 | ' --config ' + self.build_type + | 644 | ' --config ' + self.build_type + |
637 | ' --startup imprudence-bin') | 645 | ' --startup meta-impy-bin') |
638 | print 'Running %r in %r' % (vstool_cmd, getcwd()) | 646 | print 'Running %r in %r' % (vstool_cmd, getcwd()) |
639 | self.run(vstool_cmd) | 647 | self.run(vstool_cmd) |
640 | print >> open(stamp, 'w'), self.build_type | 648 | print >> open(stamp, 'w'), self.build_type |
@@ -694,7 +702,7 @@ Usage: develop.py [options] [command [command-options]] | |||
694 | 702 | ||
695 | Options: | 703 | Options: |
696 | -h | --help print this help message | 704 | -h | --help print this help message |
697 | --standalone build standalone, without Linden prebuild libraries | 705 | --standalone build standalone, without prebuild libraries |
698 | --unattended build unattended, do not invoke any tools requiring | 706 | --unattended build unattended, do not invoke any tools requiring |
699 | a human response | 707 | a human response |
700 | --universal build a universal binary on Mac OS X (unsupported) | 708 | --universal build a universal binary on Mac OS X (unsupported) |
@@ -729,6 +737,15 @@ Examples: | |||
729 | ''' | 737 | ''' |
730 | 738 | ||
731 | def main(arguments): | 739 | def main(arguments): |
740 | if os.getenv('DISTCC_DIR') is None: | ||
741 | distcc_dir = os.path.join(getcwd(), '.distcc') | ||
742 | if not os.path.exists(distcc_dir): | ||
743 | os.mkdir(distcc_dir) | ||
744 | print "setting DISTCC_DIR to %s" % distcc_dir | ||
745 | os.environ['DISTCC_DIR'] = distcc_dir | ||
746 | else: | ||
747 | print "DISTCC_DIR is set to %s" % os.getenv('DISTCC_DIR') | ||
748 | |||
732 | setup = setup_platform[sys.platform]() | 749 | setup = setup_platform[sys.platform]() |
733 | try: | 750 | try: |
734 | opts, args = getopt.getopt( | 751 | opts, args = getopt.getopt( |