[SCM] Samba Shared Repository - branch v3-6-test updated

Günther Deschner gd at samba.org
Fri Jan 7 02:45:16 MST 2011


The branch, v3-6-test has been updated
       via  2cc005a s4-waf: get the version number right on private libraries
      from  837333e s3-waf: make the --with-Xdir options work more like in the classic build.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 2cc005a32f1ee25186e9da793120e72d0af845f2
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Dec 8 11:25:28 2010 +1100

    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 at samba.org>
    (cherry picked from commit d5bf5255917862f35bb6849a407539c43cde2b04)

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/samba_version.py |   13 +++++++++++++
 buildtools/wafsamba/wafsamba.py      |    2 +-
 source4/wscript                      |   22 +++++-----------------
 source4/wscript_build                |    3 +++
 4 files changed, 22 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index df71584..c5f424d 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:
@@ -244,3 +245,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 5d13fa1..4e1b3e1 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -191,7 +191,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':
diff --git a/source4/wscript b/source4/wscript
index 48f340c..145f6b8 100644
--- a/source4/wscript
+++ b/source4/wscript
@@ -8,19 +8,7 @@ VERSION=None
 
 import sys, os
 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
-import wafsamba, Options, samba_dist, Scripting, Utils
-
-
-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 env:
-        env = samba_utils.LOAD_ENVIRONMENT()
-
-    version = wafsamba.samba_version_file("./VERSION", "..", env)
-    Utils.g_module.VERSION = version.STRING
-    return version
+import wafsamba, Options, samba_dist, Scripting, Utils, samba_version
 
 
 samba_dist.DIST_DIRS('.')
@@ -61,7 +49,7 @@ def set_options(opt):
 
 
 def configure(conf):
-    version = load_version(env=conf.env)
+    version = samba_version.load_version(env=conf.env)
 
     conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
     conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True)
@@ -152,7 +140,7 @@ def ctags(ctx):
 # of commands in --help
 def build(bld):
     '''build all targets'''
-    load_version(env=bld.env)
+    samba_version.load_version(env=bld.env)
     pass
 
 
@@ -178,12 +166,12 @@ def wafdocs(ctx):
 
 def dist():
     '''makes a tarball for distribution'''
-    load_version(env=None)
+    samba_version.load_version(env=None)
     samba_dist.dist()
 
 def distcheck():
     '''test that distribution tarball builds and installs'''
-    load_version(env=None)
+    samba_version.load_version(env=None)
     import Scripting
     d = Scripting.distcheck
     d(subdir='source4')
diff --git a/source4/wscript_build b/source4/wscript_build
index 474aca6..27c6932 100644
--- a/source4/wscript_build
+++ b/source4/wscript_build
@@ -5,11 +5,14 @@
 import os
 srcdir = ".."
 
+import samba_version
+
 # create separate build groups for building the asn1 and et compiler, then
 # building the C from ASN1 and IDL, and finally the main build process
 bld.SETUP_BUILD_GROUPS()
 bld.AUTOCLEANUP_STALE_FILES()
 
+samba_version.load_version(bld.env)
 bld.SAMBA_MKVERSION('version.h')
 
 # bld.ENABLE_MAGIC_ORDERING()


-- 
Samba Shared Repository


More information about the samba-cvs mailing list