summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/scripts/Makefile.waf3
-rw-r--r--buildtools/wafsamba/samba_utils.py10
-rw-r--r--source4/wscript4
3 files changed, 17 insertions, 0 deletions
diff --git a/buildtools/scripts/Makefile.waf b/buildtools/scripts/Makefile.waf
index 1345f19e91..5af4fd4239 100644
--- a/buildtools/scripts/Makefile.waf
+++ b/buildtools/scripts/Makefile.waf
@@ -29,6 +29,9 @@ clean:
distclean:
$(WAF) distclean
+reconfigure: configure
+ $(WAF) reconfigure
+
# some compatibility make targets
everything: all
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 335313e5dc..f0360688ba 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -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)
diff --git a/source4/wscript b/source4/wscript
index 880069ed0e..05bee1a6fe 100644
--- a/source4/wscript
+++ b/source4/wscript
@@ -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)