summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-02-23 17:10:10 +1100
committerAndrew Tridgell <tridge@samba.org>2011-02-23 07:55:28 +0100
commit4f48a28c3c47d43c962cfa2a9374f6860ed28591 (patch)
tree3183f4079334ac8ba22c4d0e82e0fd994cd49500 /buildtools/wafsamba
parent0a6e0edc047e6ec4b4fe9483f9961fff6b7061f9 (diff)
downloadsamba-4f48a28c3c47d43c962cfa2a9374f6860ed28591.tar.gz
samba-4f48a28c3c47d43c962cfa2a9374f6860ed28591.tar.bz2
samba-4f48a28c3c47d43c962cfa2a9374f6860ed28591.zip
build: fixed 'make dist' without configuring
this finds git inside samba_version.py thanks to Simo for noticing this problem Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Feb 23 07:55:28 CET 2011 on sn-devel-104
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_version.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index 4fe280ee3a..0b0c159f55 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -52,6 +52,10 @@ def bzr_version_summary(path):
def git_version_summary(path, env=None):
# Get version from GIT
+ if not 'GIT' in env and os.path.exists("/usr/bin/git"):
+ # this is useful when doing make dist without configuring
+ env.GIT = "/usr/bin/git"
+
if not 'GIT' in env:
return ("GIT-UNKNOWN", {})
@@ -74,7 +78,7 @@ def git_version_summary(path, env=None):
ret = "GIT-" + fields["GIT_COMMIT_ABBREV"]
if env.GIT_LOCAL_CHANGES:
- clean = Utils.cmd_output('git diff HEAD | wc -l', silent=True).strip()
+ clean = Utils.cmd_output('%s diff HEAD | wc -l' % env.GIT, silent=True).strip()
if clean == "0":
fields["COMMIT_IS_CLEAN"] = 1
else: