summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_patterns.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-06-28 13:40:32 +1000
committerAndrew Tridgell <tridge@samba.org>2010-06-29 14:28:08 +1000
commit30dc87dab98a864ea640fb1df693b6eb8df6a920 (patch)
tree15346580ebdda6bf5ff94b798382424fd832a258 /buildtools/wafsamba/samba_patterns.py
parent3774ba350e6b828512e693b982e0927877cd13eb (diff)
downloadsamba-30dc87dab98a864ea640fb1df693b6eb8df6a920.tar.gz
samba-30dc87dab98a864ea640fb1df693b6eb8df6a920.tar.bz2
samba-30dc87dab98a864ea640fb1df693b6eb8df6a920.zip
build: only use git when found by configure
this rebuilds version.h whenever the git version changes, so we always get the right version with samba -V. That adds about 15s to the build time on each git commit, which shouldn't be too onerous
Diffstat (limited to 'buildtools/wafsamba/samba_patterns.py')
-rw-r--r--buildtools/wafsamba/samba_patterns.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_patterns.py b/buildtools/wafsamba/samba_patterns.py
index ae0dbe2cf8..4307bf2585 100644
--- a/buildtools/wafsamba/samba_patterns.py
+++ b/buildtools/wafsamba/samba_patterns.py
@@ -10,7 +10,9 @@ def write_version_header(task):
src = task.inputs[0].srcpath(task.env)
tgt = task.outputs[0].bldpath(task.env)
- version = samba_version_file(src)
+ have_git = 'GIT' in task.env
+
+ version = samba_version_file(src, have_git=have_git)
string = str(version)
f = open(tgt, 'w')
@@ -24,5 +26,6 @@ def SAMBA_MKVERSION(bld, target):
t = bld.SAMBA_GENERATOR('VERSION',
rule=write_version_header,
source= 'VERSION',
- target=target)
+ target=target,
+ always=True)
Build.BuildContext.SAMBA_MKVERSION = SAMBA_MKVERSION