[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Fri May 7 07:16:30 MDT 2010


The branch, master has been updated
       via  6fd4861... s4-devel: a very useful script when dealing with library/linking issues
       via  0222665... build: fixed pc file variable substitution
      from  e8c3da1... idl: get the logic of the prevous commit right

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


- Log -----------------------------------------------------------------
commit 6fd4861d9def34c4dccce214c78bfbcc0fa291fd
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri May 7 13:47:37 2010 +0200

    s4-devel: a very useful script when dealing with library/linking issues
    
    I use this all the time, so I thought I'd put it in the tree for
    others

commit 022266566d7b87fe3aea0c7080f6374c7740b11c
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri May 7 11:41:50 2010 +0200

    build: fixed pc file variable substitution
    
    We should not substitute for the first use of each variable
    declaration in the pkgconfig file

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

Summary of changes:
 buildtools/wafsamba/wafsamba.py |    8 +++++++-
 source4/scripting/devel/nmfind  |   15 +++++++++++++++
 2 files changed, 22 insertions(+), 1 deletions(-)
 create mode 100755 source4/scripting/devel/nmfind


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 2b53a9c..96e9515 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -662,6 +662,7 @@ def subst_at_vars(task):
     # split on the vars
     a = re.split('(@\w+@)', s)
     out = []
+    done_var = {}
     back_sub = [ ('PREFIX', '${prefix}'), ('EXEC_PREFIX', '${exec_prefix}')]
     for v in a:
         if re.match('@\w+@', v):
@@ -676,7 +677,12 @@ def subst_at_vars(task):
             for (b, m) in back_sub:
                 s = task.env[b]
                 if s == v[0:len(s)]:
-                    v = m + v[len(s):]
+                    if not b in done_var:
+                        # we don't want to substitute the first usage
+                        done_var[b] = True
+                    else:
+                        v = m + v[len(s):]
+                    break
         out.append(v)
     contents = ''.join(out)
     f = open(tgt, 'w')
diff --git a/source4/scripting/devel/nmfind b/source4/scripting/devel/nmfind
new file mode 100755
index 0000000..54935f2
--- /dev/null
+++ b/source4/scripting/devel/nmfind
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# find object files containing a symbol
+# for example:
+#   nmfind foo_function $(find bin/default -name '*.o')
+
+TARGET=$1
+shift
+for f in $*; do
+if nm $f 2>&1 | grep $TARGET > /dev/null; then
+  echo [$f]
+  nm $f | grep $TARGET
+  echo
+fi
+done


-- 
Samba Shared Repository


More information about the samba-cvs mailing list