Skip to content
Snippets Groups Projects
Commit 93cf3d89 authored by Christian Goetze's avatar Christian Goetze
Browse files

Put the os.environ["DISTCC"] = ... call into main()

parent 77c1e2b7
No related branches found
No related tags found
No related merge requests found
...@@ -381,12 +381,6 @@ def mk_distcc_hosts(basename, range, num_cpus): ...@@ -381,12 +381,6 @@ def mk_distcc_hosts(basename, range, num_cpus):
cpus += 2 * len(stations) cpus += 2 * len(stations)
return ' '.join(hosts), cpus return ' '.join(hosts), cpus
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)
os.environ['DISTCC_DIR'] = distcc_dir
if job_count is None: if job_count is None:
hosts, job_count = count_distcc_hosts() hosts, job_count = count_distcc_hosts()
if hosts == 1: if hosts == 1:
...@@ -710,6 +704,15 @@ def cmake_commandline(self, src_dir, build_dir, opts, simple): ...@@ -710,6 +704,15 @@ def cmake_commandline(self, src_dir, build_dir, opts, simple):
''' '''
def main(arguments): 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]() setup = setup_platform[sys.platform]()
try: try:
opts, args = getopt.getopt( opts, args = getopt.getopt(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment