summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-22 07:48:10 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:59 +1000
commit8bc95608223033428cc1fae7525f07e22ab7d8ef (patch)
tree0c095c036aaa6dbcb731b2a1ec44294bf4d0c560 /buildtools
parent35aaf0e7723142d25b19a33c1701961a8e142ede (diff)
downloadsamba-8bc95608223033428cc1fae7525f07e22ab7d8ef.tar.gz
samba-8bc95608223033428cc1fae7525f07e22ab7d8ef.tar.bz2
samba-8bc95608223033428cc1fae7525f07e22ab7d8ef.zip
build: more complete implementation of waf configure -C
this is a closer emulation of the autoconf behaviour
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_autoconf.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index fc8027c5f2..7e910ad8a4 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -1,6 +1,6 @@
# a waf tool to add autoconf-like macros to the configure section
-import Build, os, Options
+import Build, os, Options, preproc
import string
from Configure import conf
from samba_utils import *
@@ -429,13 +429,22 @@ def CHECK_CC_ENV(conf):
# make for nicer logs if just a single command
conf.env.CC = conf.env.CC[0]
-@conf
-def ENABLE_CONFIGURE_CACHE(conf):
- '''enable cache of configure results'''
- if os.environ.get('WAFCACHE'):
- # already setup
- return
- cache_path = os.path.join(conf.blddir, '.confcache')
- mkdir_p(cache_path)
- Options.cache_global = os.environ['WAFCACHE'] = cache_path
+@conf
+def SETUP_CONFIGURE_CACHE(conf, enable):
+ '''enable/disable cache of configure results'''
+ if enable:
+ # when -C is chosen, we will use a private cache and will
+ # not look into system includes. This roughtly matches what
+ # autoconf does with -C
+ cache_path = os.path.join(conf.blddir, '.confcache')
+ mkdir_p(cache_path)
+ Options.cache_global = os.environ['WAFCACHE'] = cache_path
+ else:
+ # when -C is not chosen we will not cache configure checks
+ # We set the recursion limit low to prevent waf from spending
+ # a lot of time on the signatures of the files.
+ Options.cache_global = os.environ['WAFCACHE'] = ''
+ preproc.recursion_limit = 1
+ # in either case we don't need to scan system includes
+ preproc.go_absolute = False