From 30dc87dab98a864ea640fb1df693b6eb8df6a920 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 28 Jun 2010 13:40:32 +1000 Subject: 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 --- buildtools/wafsamba/samba_patterns.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'buildtools/wafsamba/samba_patterns.py') 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 -- cgit