From 8bc5194b048d050b2d3ff30a5636f1567ec19e1e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 May 2010 15:12:29 +0200 Subject: 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 --- buildtools/wafsamba/samba_optimisation.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'buildtools') 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 -- cgit