build: added a reconfigure target
authorAndrew Tridgell <tridge@samba.org>
Thu, 6 May 2010 12:51:28 +0000 (14:51 +0200)
committerAndrew Tridgell <tridge@samba.org>
Thu, 6 May 2010 12:56:43 +0000 (14:56 +0200)
this is meant to be used by the s3 build, to allow jelmers work on
smbtorture4 in s3 to avoid re-running configure unless its needed

buildtools/scripts/Makefile.waf
buildtools/wafsamba/samba_utils.py
source4/wscript

index 1345f19e916c490ae85fce7edf63e110b6d1dba8..5af4fd4239538bfbfbe68a5c2e7a969453768eb1 100644 (file)
@@ -29,6 +29,9 @@ clean:
 distclean:
        $(WAF) distclean
 
+reconfigure: configure
+       $(WAF) reconfigure
+
 # some compatibility make targets
 everything: all
 
index 335313e5dc6b1356a0c8710e4e10cee088769b39..f0360688ba0e5b28d276d8c8c40ebb8f9aa1ab66 100644 (file)
@@ -507,3 +507,13 @@ def load_file(filename):
     except:
         return None
     return r
+
+
+def reconfigure(ctx):
+    '''rerun configure if necessary'''
+    import Configure, samba_wildcard, Scripting
+    if not os.path.exists(".lock-wscript"):
+        raise Utils.WafError('configure has not been run')
+    bld = samba_wildcard.fake_build_environment()
+    Configure.autoconfig = True
+    Scripting.check_configured(bld)
index 880069ed0e248833d528ca17346254d5c0d86643..05bee1a6fed48880ebb9d79e9c9697ef600f335c 100644 (file)
@@ -157,3 +157,7 @@ def main():
     wildcard_main(wildcard_cmd)
 Scripting.main = main
 
+def reconfigure(ctx):
+    '''reconfigure if config scripts have changed'''
+    import samba_utils
+    samba_utils.reconfigure(ctx)