[SCM] Samba Shared Repository - branch master updated

Uri Simchoni uri at samba.org
Sat Jan 2 21:32:03 UTC 2016


The branch, master has been updated
       via  d60465c build:wafsamba: Use the upstream version of gccdeps
       via  88969d7 thirdparty:waf: Update gccdeps from upstream
      from  1bc806a Happy New Year 2016!

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit d60465cfec53a0476ea26b11cc857210ffdfc585
Author: Thomas Nagy <tnagy at waf.io>
Date:   Sat Dec 5 12:09:33 2015 +0100

    build:wafsamba: Use the upstream version of gccdeps
    
    This removes the duplicate gccdeps file provided in the Samba tree.
    The two files buildtools/wafsamba/gccdeps.py and thirdparty/wafadmin/3rdparty/gccdeps.py
    are identical except for the whitespaces (compare them with `diff -burN`)
    
    Signed-off-by: Thomas Nagy <tnagy at waf.io>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    
    Autobuild-User(master): Uri Simchoni <uri at samba.org>
    Autobuild-Date(master): Sat Jan  2 22:31:56 CET 2016 on sn-devel-144

commit 88969d75295421386de339d2501965c0db685756
Author: Thomas Nagy <tnagy at waf.io>
Date:   Sat Dec 5 12:04:29 2015 +0100

    thirdparty:waf: Update gccdeps from upstream
    
    The version from upstream was updated. It is not used at this moment
    in Samba because there is a copy kept in builtools/wafsamba/gccdeps.py
    which will be removed soon.
    
    Signed-off-by: Thomas Nagy <tnagy at waf.io>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>

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

Summary of changes:
 buildtools/wafsamba/gccdeps.py               | 127 ---------------------------
 buildtools/wafsamba/wscript                  |   5 ++
 third_party/waf/wafadmin/3rdparty/gccdeps.py |   2 +-
 3 files changed, 6 insertions(+), 128 deletions(-)
 delete mode 100644 buildtools/wafsamba/gccdeps.py


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/gccdeps.py b/buildtools/wafsamba/gccdeps.py
deleted file mode 100644
index 47505f0..0000000
--- a/buildtools/wafsamba/gccdeps.py
+++ /dev/null
@@ -1,127 +0,0 @@
-# encoding: utf-8
-# Thomas Nagy, 2008-2010 (ita)
-
-"""
-Execute the tasks with gcc -MD, read the dependencies from the .d file
-and prepare the dependency calculation for the next run
-"""
-
-import os, re, threading
-import Task, Logs, Utils, preproc
-from TaskGen import before, after, feature
-
-lock = threading.Lock()
-
-preprocessor_flag = '-MD'
-
- at feature('c', 'cc')
- at before('apply_core')
-def add_mmd_cc(self):
-    if self.env.get_flat('CCFLAGS').find(preprocessor_flag) < 0:
-        self.env.append_value('CCFLAGS', preprocessor_flag)
-
- at feature('cxx')
- at before('apply_core')
-def add_mmd_cxx(self):
-    if self.env.get_flat('CXXFLAGS').find(preprocessor_flag) < 0:
-        self.env.append_value('CXXFLAGS', preprocessor_flag)
-
-def scan(self):
-    "the scanner does not do anything initially"
-    nodes = self.generator.bld.node_deps.get(self.unique_id(), [])
-    names = []
-    return (nodes, names)
-
-re_o = re.compile("\.o$")
-re_src = re.compile("^(\.\.)[\\/](.*)$")
-
-def post_run(self):
-    # The following code is executed by threads, it is not safe, so a lock is needed...
-
-    if getattr(self, 'cached', None):
-        return Task.Task.post_run(self)
-
-    name = self.outputs[0].abspath(self.env)
-    name = re_o.sub('.d', name)
-    txt = Utils.readf(name)
-    #os.unlink(name)
-
-    txt = txt.replace('\\\n', '')
-
-    lst = txt.strip().split(':')
-    val = ":".join(lst[1:])
-    val = val.split()
-
-    nodes = []
-    bld = self.generator.bld
-
-    f = re.compile("^("+self.env.variant()+"|\.\.)[\\/](.*)$")
-    for x in val:
-        if os.path.isabs(x):
-
-            if not preproc.go_absolute:
-                continue
-
-            lock.acquire()
-            try:
-                node = bld.root.find_resource(x)
-            finally:
-                lock.release()
-        else:
-            g = re.search(re_src, x)
-            if g:
-                x = g.group(2)
-                lock.acquire()
-                try:
-                    node = bld.bldnode.parent.find_resource(x)
-                finally:
-                    lock.release()
-            else:
-                g = re.search(f, x)
-                if g:
-                    x = g.group(2)
-                    lock.acquire()
-                    try:
-                        node = bld.srcnode.find_resource(x)
-                    finally:
-                        lock.release()
-
-        if id(node) == id(self.inputs[0]):
-            # ignore the source file, it is already in the dependencies
-            # this way, successful config tests may be retrieved from the cache
-            continue
-
-        if not node:
-            raise ValueError('could not find %r for %r' % (x, self))
-        else:
-            nodes.append(node)
-
-    Logs.debug('deps: real scanner for %s returned %s' % (str(self), str(nodes)))
-
-    bld.node_deps[self.unique_id()] = nodes
-    bld.raw_deps[self.unique_id()] = []
-
-    try:
-        del self.cache_sig
-    except:
-        pass
-
-    Task.Task.post_run(self)
-
-import Constants, Utils
-def sig_implicit_deps(self):
-    try:
-        return Task.Task.sig_implicit_deps(self)
-    except Utils.WafError:
-        return Constants.SIG_NIL
-
-for name in 'cc cxx'.split():
-    try:
-        cls = Task.TaskBase.classes[name]
-    except KeyError:
-        pass
-    else:
-        cls.post_run = post_run
-        cls.scan = scan
-        cls.sig_implicit_deps = sig_implicit_deps
-
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index a4cb620..586cc4b 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -229,6 +229,11 @@ def configure(conf):
 
     # older gcc versions (< 4.4) does not work with gccdeps, so we have to see if the .d file is generated
     if Options.options.enable_gccdeps:
+        # stale file removal - the configuration may pick up the old .pyc file
+        p = os.path.join(conf.srcdir, 'buildtools/wafsamba/gccdeps.pyc')
+        if os.path.exists(p):
+            os.remove(p)
+
         from TaskGen import feature, after
         @feature('testd')
         @after('apply_core')
diff --git a/third_party/waf/wafadmin/3rdparty/gccdeps.py b/third_party/waf/wafadmin/3rdparty/gccdeps.py
index 28a889d..55cd515 100644
--- a/third_party/waf/wafadmin/3rdparty/gccdeps.py
+++ b/third_party/waf/wafadmin/3rdparty/gccdeps.py
@@ -15,7 +15,7 @@ lock = threading.Lock()
 
 preprocessor_flag = '-MD'
 
- at feature('cc')
+ at feature('cc', 'c')
 @before('apply_core')
 def add_mmd_cc(self):
 	if self.env.get_flat('CCFLAGS').find(preprocessor_flag) < 0:


-- 
Samba Shared Repository



More information about the samba-cvs mailing list