summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-12-08 11:25:28 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-08 05:26:06 +0100
commitd5bf5255917862f35bb6849a407539c43cde2b04 (patch)
tree29c63dea9a6f52bfcde0a2433a4a8eeac5cf7765 /buildtools
parent18177f1e52e2767e1266f44ea32a8f8d82a17b74 (diff)
downloadsamba-d5bf5255917862f35bb6849a407539c43cde2b04.tar.gz
samba-d5bf5255917862f35bb6849a407539c43cde2b04.tar.bz2
samba-d5bf5255917862f35bb6849a407539c43cde2b04.zip
s4-waf: get the version number right on private libraries
use the first digit of the version number for the library version Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_version.py13
-rw-r--r--buildtools/wafsamba/wafsamba.py2
2 files changed, 14 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index 4f99b2c087..5804afbe4b 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -1,5 +1,6 @@
import os
import Utils
+import samba_utils
def bzr_version_summary(path):
try:
@@ -246,3 +247,15 @@ def samba_version_file(version_file, path, env=None):
raise
return SambaVersion(version_dict, path, env=env)
+
+
+
+def load_version(env=None):
+ '''load samba versions either from ./VERSION or git
+ return a version object for detailed breakdown'''
+ if not env:
+ env = samba_utils.LOAD_ENVIRONMENT()
+
+ version = samba_version_file("./VERSION", "..", env)
+ Utils.g_module.VERSION = version.STRING
+ return version
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 1d3ced13ce..10b7dfe0f4 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -192,7 +192,7 @@ def SAMBA_LIBRARY(bld, libname, source,
if vnum:
Logs.error("vnum is invalid for private libraries")
sys.exit(1)
- vnum = Utils.g_module.VERSION
+ vnum = Utils.g_module.VERSION[0]
features = 'cc cshlib symlink_lib install_lib'
if target_type == 'PYTHON':