summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-05-03 15:12:29 +0200
committerAndrew Tridgell <tridge@samba.org>2010-05-03 17:16:47 +0200
commit8bc5194b048d050b2d3ff30a5636f1567ec19e1e (patch)
treec7c03de3760201f0b03d124cad7e5e162f0eca49 /buildtools
parent4affc58c6a757c379aeb22d0b71cfa06aa926761 (diff)
downloadsamba-8bc5194b048d050b2d3ff30a5636f1567ec19e1e.tar.gz
samba-8bc5194b048d050b2d3ff30a5636f1567ec19e1e.tar.bz2
samba-8bc5194b048d050b2d3ff30a5636f1567ec19e1e.zip
build: fix for combined configure/build in one command
This is a fix from ita for "waf distclean configure build". Running it as one command failed with missing config.h
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_optimisation.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_optimisation.py b/buildtools/wafsamba/samba_optimisation.py
index 8e8012c955..1c3478c2a4 100644
--- a/buildtools/wafsamba/samba_optimisation.py
+++ b/buildtools/wafsamba/samba_optimisation.py
@@ -9,11 +9,16 @@
from TaskGen import feature, after
import preproc
-kak = {}
@feature('cc', 'cxx')
@after('apply_type_vars', 'apply_lib_vars', 'apply_core')
def apply_incpaths(self):
lst = []
+
+ try:
+ kak = self.bld.kak
+ except AttributeError:
+ kak = self.bld.kak = {}
+
# TODO move the uselib processing out of here
for lib in self.to_list(self.uselib):
for path in self.env['CPPPATH_' + lib]:
@@ -52,7 +57,6 @@ def apply_incpaths(self):
if node:
self.env.append_value('INC_PATHS', node)
-cac = {}
@feature('cc')
@after('apply_incpaths')
def apply_obj_vars_cc(self):
@@ -63,7 +67,10 @@ def apply_obj_vars_cc(self):
lss = env['_CCINCFLAGS']
- global cac
+ try:
+ cac = self.bld.cac
+ except AttributeError:
+ cac = self.bld.cac = {}
# local flags come first
# set the user-defined includes paths