summaryrefslogtreecommitdiff
path: root/source4/wscript
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-16 12:05:14 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-16 01:51:54 +0000
commitfe5c48cbed29b669f17370436d0cf18ca0ccb474 (patch)
treeddb320fca8458d2b1f89edf96614d623f0ffbf91 /source4/wscript
parent96bdcf7ea9d06e4681af012974458d67d264cfda (diff)
downloadsamba-fe5c48cbed29b669f17370436d0cf18ca0ccb474.tar.gz
samba-fe5c48cbed29b669f17370436d0cf18ca0ccb474.tar.bz2
samba-fe5c48cbed29b669f17370436d0cf18ca0ccb474.zip
waf: added --git-local-changes configure option
if you use --git-local-changes then the version number that waf extracts from git will have a '+' on the end if you have local changes, as determined by running 'git diff'. This used to be the default, but unfortunately it is far too slow on some systems. On a NFS build system I was using the first line of configure took about 2 minutes. Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Nov 16 01:51:54 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/wscript')
-rw-r--r--source4/wscript16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/wscript b/source4/wscript
index bf4ccbdfca..80916f5579 100644
--- a/source4/wscript
+++ b/source4/wscript
@@ -11,14 +11,14 @@ sys.path.insert(0, srcdir+"/buildtools/wafsamba")
import wafsamba, Options, samba_dist, Scripting, Utils
-def load_version(have_git=False):
+def load_version(env=None):
'''load samba versions either from ./VERSION or git
return a version object for detailed breakdown'''
import samba_utils, Utils
- if not have_git:
+ if not env:
env = samba_utils.LOAD_ENVIRONMENT()
- have_git = 'GIT' in env
- version = wafsamba.samba_version_file("./VERSION", "..", have_git=have_git)
+
+ version = wafsamba.samba_version_file("./VERSION", "..", env)
Utils.g_module.VERSION = version.STRING
return version
@@ -61,7 +61,7 @@ def set_options(opt):
def configure(conf):
- version = load_version(have_git=True)
+ version = load_version(env=conf.env)
conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True)
@@ -150,7 +150,7 @@ def ctags(ctx):
# of commands in --help
def build(bld):
'''build all targets'''
- load_version()
+ load_version(env=bld.env)
pass
@@ -176,12 +176,12 @@ def wafdocs(ctx):
def dist():
'''makes a tarball for distribution'''
- load_version()
+ load_version(env=None)
samba_dist.dist()
def distcheck():
'''test that distribution tarball builds and installs'''
- load_version()
+ load_version(env=None)
import Scripting
d = Scripting.distcheck
d(subdir='source4')