Lumiera
0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
ToolDistCC.py
Go to the documentation of this file.
1
# coding: utf-8
2
5
6
# Copyright (C) Lumiera.org and FreeOrion.org
7
# 2008, Hermann Vosseler <Ichthyostega@web.de>
8
#
9
# **Lumiera** is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by the
11
# Free Software Foundation; either version 2 of the License, or (at your
12
# option) any later version. See the file COPYING for further details.
13
14
15
# This SCons builder was extracted from http://www.freeorion.org/
16
# FreeOrion is an open-source platform-independent galactic conquest game
17
#
18
# history: 12/2008 adapted for Lumiera build system
19
20
21
import
os
22
from
Buildhelper
import
*
23
24
25
def
generate
(env):
26
""" Modify the environment such as to redirect any
27
C/C++ compiler invocations through DistCC. Additionally
28
pull in the environment config variables used by DistCC
29
"""
30
if
not
exists
(env):
return
31
32
assert
env[
'DISTCC'
]
33
if
not
env[
'DISTCC'
]
in
env[
'CC'
]:
34
env[
'CC'
] = env.subst(
'$DISTCC $CC'
)
35
if
not
env[
'DISTCC'
]
in
env[
'CXX'
]:
36
env[
'CXX'
] = env.subst(
'$DISTCC $CXX'
)
37
print(env.subst(
"* Build using $DISTCC"
))
38
for
i
in
[
'HOME'
39
,
'DISTCC_HOSTS'
40
,
'DISTCC_VERBOSE'
41
,
'DISTCC_FALLBACK'
42
,
'DISTCC_LOG'
43
,
'DISTCC_MMAP'
44
,
'DISTCC_SAVE_TEMPS'
45
,
'DISTCC_TCP_CORK'
46
,
'DISTCC_SSH'
47
]:
48
if
i
in
os.environ
and
i
not
in
env:
49
env[
'ENV'
][i] = os.environ[i]
50
51
52
def
exists
(env):
53
""" Ensure DistCC exists.
54
"""
55
return
checkCommandOption
(env,
'DISTCC'
, cmdName=
'distcc'
)
56
Buildhelper.checkCommandOption
checkCommandOption(env, optID, val=None, cmdName=None)
evaluate and verify an option, which may point at a command.
Definition
Buildhelper.py:143
ToolDistCC.generate
generate(env)
Modify the environment such as to redirect any C/C++ compiler invocations through DistCC.
Definition
ToolDistCC.py:25
ToolDistCC.exists
exists(env)
Ensure DistCC exists.
Definition
ToolDistCC.py:52
admin
scons
ToolDistCC.py
Generated on Thu Dec 11 2025 for Lumiera by
1.9.8