build: added --enable-auto-reconfigure
authorAndrew Tridgell <tridge@samba.org>
Thu, 22 Apr 2010 02:03:22 +0000 (12:03 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 22 Apr 2010 02:03:36 +0000 (12:03 +1000)
this is off by default until some issues are resolved. See my mail to
samba-technical for details.

buildtools/wafsamba/wscript

index 76e9b1f357294a0f985d68ab541ddb2c53314628..4b388cc267356835753e87e87167d940709af28c 100644 (file)
@@ -2,11 +2,20 @@
 
 # this is a base set of waf rules that everything else pulls in first
 
-import sys, wafsamba
+import sys, wafsamba, Configure
 import Options, os, preproc
 from samba_utils import *
 from optparse import SUPPRESS_HELP
 
+# this forces configure to be re-run if any of the configure
+# sections of the build scripts change. We have to check
+# for this in sys.argv as options have not yet been parsed when
+# we need to set this. This is off by default until some issues
+# are resolved related to WAFCACHE. It will need a lot of testing
+# before it is enabled by default.
+if '--enable-auto-reconfigure' in sys.argv:
+    Configure.autoconfig = True
+
 def set_options(opt):
     opt.tool_options('compiler_cc')
 
@@ -59,6 +68,9 @@ def set_options(opt):
     gr.add_option('-C',
                    help='enable configure cacheing',
                    action='store_true', dest='enable_configure_cache')
+    gr.add_option('--enable-auto-reconfigure',
+                   help='enable automatic reconfigure on build',
+                   action='store_true', dest='enable_auto_reconfigure')
     gr.add_option('--enable-developer',
                    help=("Turn on developer warnings and debugging"),
                    action="store_true", dest='developer', default=False)