[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Wed Jan 4 16:11:04 MST 2012


The branch, master has been updated
       via  d2d4dfd waf: Use git repository.
       via  4f4bce5 Include waf as an extracted source directory, rather than as a one-in-a-file script.
      from  1b45f2a s4:pyrpc: add 'user_session_key' getter to the connection object

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


- Log -----------------------------------------------------------------
commit d2d4dfdfedc59cf2b4f4d667ae5c97bdd5df4b44
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Jan 4 21:00:42 2012 +0100

    waf: Use git repository.
    
    Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
    Autobuild-Date: Thu Jan  5 00:10:24 CET 2012 on sn-devel-104

commit 4f4bce5301ffd8c12aed1b108affa1a75feefb67
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Jan 4 00:31:27 2012 +0100

    Include waf as an extracted source directory, rather than as a one-in-a-file script.

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

Summary of changes:
 buildtools/README                                  |   12 +
 buildtools/bin/README                              |   16 -
 buildtools/bin/waf                                 |   78 ++-
 buildtools/bin/waf-svn                             |  Bin 109232 -> 0 bytes
 buildtools/update-waf.sh                           |   13 +
 buildtools/wafadmin/3rdparty/ParallelDebug.py      |  299 +++++
 buildtools/wafadmin/3rdparty/batched_cc.py         |  183 +++
 buildtools/wafadmin/3rdparty/boost.py              |  343 ++++++
 buildtools/wafadmin/3rdparty/fluid.py              |   27 +
 .../{wafsamba => wafadmin/3rdparty}/gccdeps.py     |    0
 buildtools/wafadmin/3rdparty/go.py                 |  111 ++
 buildtools/wafadmin/3rdparty/lru_cache.py          |   97 ++
 buildtools/wafadmin/3rdparty/paranoid.py           |   35 +
 buildtools/wafadmin/3rdparty/swig.py               |  190 +++
 buildtools/wafadmin/3rdparty/valadoc.py            |  113 ++
 buildtools/wafadmin/Build.py                       | 1033 +++++++++++++++++
 buildtools/wafadmin/Configure.py                   |  444 ++++++++
 buildtools/wafadmin/Constants.py                   |   76 ++
 buildtools/wafadmin/Environment.py                 |  210 ++++
 buildtools/wafadmin/Logs.py                        |  134 +++
 buildtools/wafadmin/Node.py                        |  695 +++++++++++
 buildtools/wafadmin/Options.py                     |  288 +++++
 buildtools/wafadmin/Runner.py                      |  236 ++++
 buildtools/wafadmin/Scripting.py                   |  586 ++++++++++
 buildtools/wafadmin/Task.py                        | 1200 ++++++++++++++++++++
 buildtools/wafadmin/TaskGen.py                     |  612 ++++++++++
 buildtools/wafadmin/Tools/__init__.py              |    4 +
 buildtools/wafadmin/Tools/ar.py                    |   36 +
 buildtools/wafadmin/Tools/bison.py                 |   38 +
 buildtools/wafadmin/Tools/cc.py                    |  100 ++
 buildtools/wafadmin/Tools/ccroot.py                |  629 ++++++++++
 buildtools/wafadmin/Tools/compiler_cc.py           |   67 ++
 buildtools/wafadmin/Tools/compiler_cxx.py          |   62 +
 buildtools/wafadmin/Tools/compiler_d.py            |   33 +
 buildtools/wafadmin/Tools/config_c.py              |  736 ++++++++++++
 buildtools/wafadmin/Tools/cs.py                    |   68 ++
 buildtools/wafadmin/Tools/cxx.py                   |  104 ++
 buildtools/wafadmin/Tools/d.py                     |  535 +++++++++
 buildtools/wafadmin/Tools/dbus.py                  |   34 +
 buildtools/wafadmin/Tools/dmd.py                   |   64 +
 buildtools/wafadmin/Tools/flex.py                  |   25 +
 buildtools/wafadmin/Tools/gas.py                   |   38 +
 buildtools/wafadmin/Tools/gcc.py                   |  135 +++
 buildtools/wafadmin/Tools/gdc.py                   |   52 +
 buildtools/wafadmin/Tools/glib2.py                 |  164 +++
 buildtools/wafadmin/Tools/gnome.py                 |  223 ++++
 buildtools/wafadmin/Tools/gnu_dirs.py              |  111 ++
 buildtools/wafadmin/Tools/gob2.py                  |   18 +
 buildtools/wafadmin/Tools/gxx.py                   |  133 +++
 buildtools/wafadmin/Tools/icc.py                   |   37 +
 buildtools/wafadmin/Tools/icpc.py                  |   35 +
 buildtools/wafadmin/Tools/intltool.py              |  139 +++
 buildtools/wafadmin/Tools/javaw.py                 |  255 +++++
 buildtools/wafadmin/Tools/kde4.py                  |   74 ++
 buildtools/wafadmin/Tools/libtool.py               |  330 ++++++
 buildtools/wafadmin/Tools/lua.py                   |   25 +
 buildtools/wafadmin/Tools/misc.py                  |  430 +++++++
 buildtools/wafadmin/Tools/msvc.py                  |  797 +++++++++++++
 buildtools/wafadmin/Tools/nasm.py                  |   49 +
 buildtools/wafadmin/Tools/ocaml.py                 |  298 +++++
 buildtools/wafadmin/Tools/osx.py                   |  188 +++
 buildtools/wafadmin/Tools/perl.py                  |  109 ++
 buildtools/wafadmin/Tools/preproc.py               |  836 ++++++++++++++
 buildtools/wafadmin/Tools/python.py                |  413 +++++++
 buildtools/wafadmin/Tools/qt4.py                   |  505 ++++++++
 buildtools/wafadmin/Tools/ruby.py                  |  120 ++
 buildtools/wafadmin/Tools/suncc.py                 |   76 ++
 buildtools/wafadmin/Tools/suncxx.py                |   75 ++
 buildtools/wafadmin/Tools/tex.py                   |  251 ++++
 buildtools/wafadmin/Tools/unittestw.py             |  310 +++++
 buildtools/wafadmin/Tools/vala.py                  |  308 +++++
 buildtools/wafadmin/Tools/winres.py                |   45 +
 buildtools/wafadmin/Tools/xlc.py                   |   78 ++
 buildtools/wafadmin/Tools/xlcxx.py                 |   78 ++
 buildtools/wafadmin/Utils.py                       |  726 ++++++++++++
 buildtools/wafadmin/__init__.py                    |    3 +
 buildtools/wafadmin/ansiterm.py                    |  236 ++++
 buildtools/wafadmin/pproc.py                       |  620 ++++++++++
 buildtools/wafadmin/py3kfixes.py                   |  130 +++
 79 files changed, 17999 insertions(+), 17 deletions(-)
 create mode 100644 buildtools/README
 delete mode 100644 buildtools/bin/README
 mode change 120000 => 100755 buildtools/bin/waf
 delete mode 100755 buildtools/bin/waf-svn
 create mode 100755 buildtools/update-waf.sh
 create mode 100644 buildtools/wafadmin/3rdparty/ParallelDebug.py
 create mode 100644 buildtools/wafadmin/3rdparty/batched_cc.py
 create mode 100644 buildtools/wafadmin/3rdparty/boost.py
 create mode 100644 buildtools/wafadmin/3rdparty/fluid.py
 copy buildtools/{wafsamba => wafadmin/3rdparty}/gccdeps.py (100%)
 create mode 100644 buildtools/wafadmin/3rdparty/go.py
 create mode 100644 buildtools/wafadmin/3rdparty/lru_cache.py
 create mode 100644 buildtools/wafadmin/3rdparty/paranoid.py
 create mode 100644 buildtools/wafadmin/3rdparty/swig.py
 create mode 100644 buildtools/wafadmin/3rdparty/valadoc.py
 create mode 100644 buildtools/wafadmin/Build.py
 create mode 100644 buildtools/wafadmin/Configure.py
 create mode 100644 buildtools/wafadmin/Constants.py
 create mode 100644 buildtools/wafadmin/Environment.py
 create mode 100644 buildtools/wafadmin/Logs.py
 create mode 100644 buildtools/wafadmin/Node.py
 create mode 100644 buildtools/wafadmin/Options.py
 create mode 100644 buildtools/wafadmin/Runner.py
 create mode 100644 buildtools/wafadmin/Scripting.py
 create mode 100644 buildtools/wafadmin/Task.py
 create mode 100644 buildtools/wafadmin/TaskGen.py
 create mode 100644 buildtools/wafadmin/Tools/__init__.py
 create mode 100644 buildtools/wafadmin/Tools/ar.py
 create mode 100644 buildtools/wafadmin/Tools/bison.py
 create mode 100644 buildtools/wafadmin/Tools/cc.py
 create mode 100644 buildtools/wafadmin/Tools/ccroot.py
 create mode 100644 buildtools/wafadmin/Tools/compiler_cc.py
 create mode 100644 buildtools/wafadmin/Tools/compiler_cxx.py
 create mode 100644 buildtools/wafadmin/Tools/compiler_d.py
 create mode 100644 buildtools/wafadmin/Tools/config_c.py
 create mode 100644 buildtools/wafadmin/Tools/cs.py
 create mode 100644 buildtools/wafadmin/Tools/cxx.py
 create mode 100644 buildtools/wafadmin/Tools/d.py
 create mode 100644 buildtools/wafadmin/Tools/dbus.py
 create mode 100644 buildtools/wafadmin/Tools/dmd.py
 create mode 100644 buildtools/wafadmin/Tools/flex.py
 create mode 100644 buildtools/wafadmin/Tools/gas.py
 create mode 100644 buildtools/wafadmin/Tools/gcc.py
 create mode 100644 buildtools/wafadmin/Tools/gdc.py
 create mode 100644 buildtools/wafadmin/Tools/glib2.py
 create mode 100644 buildtools/wafadmin/Tools/gnome.py
 create mode 100644 buildtools/wafadmin/Tools/gnu_dirs.py
 create mode 100644 buildtools/wafadmin/Tools/gob2.py
 create mode 100644 buildtools/wafadmin/Tools/gxx.py
 create mode 100644 buildtools/wafadmin/Tools/icc.py
 create mode 100644 buildtools/wafadmin/Tools/icpc.py
 create mode 100644 buildtools/wafadmin/Tools/intltool.py
 create mode 100644 buildtools/wafadmin/Tools/javaw.py
 create mode 100644 buildtools/wafadmin/Tools/kde4.py
 create mode 100644 buildtools/wafadmin/Tools/libtool.py
 create mode 100644 buildtools/wafadmin/Tools/lua.py
 create mode 100644 buildtools/wafadmin/Tools/misc.py
 create mode 100644 buildtools/wafadmin/Tools/msvc.py
 create mode 100644 buildtools/wafadmin/Tools/nasm.py
 create mode 100644 buildtools/wafadmin/Tools/ocaml.py
 create mode 100644 buildtools/wafadmin/Tools/osx.py
 create mode 100644 buildtools/wafadmin/Tools/perl.py
 create mode 100644 buildtools/wafadmin/Tools/preproc.py
 create mode 100644 buildtools/wafadmin/Tools/python.py
 create mode 100644 buildtools/wafadmin/Tools/qt4.py
 create mode 100644 buildtools/wafadmin/Tools/ruby.py
 create mode 100644 buildtools/wafadmin/Tools/suncc.py
 create mode 100644 buildtools/wafadmin/Tools/suncxx.py
 create mode 100644 buildtools/wafadmin/Tools/tex.py
 create mode 100644 buildtools/wafadmin/Tools/unittestw.py
 create mode 100644 buildtools/wafadmin/Tools/vala.py
 create mode 100644 buildtools/wafadmin/Tools/winres.py
 create mode 100644 buildtools/wafadmin/Tools/xlc.py
 create mode 100644 buildtools/wafadmin/Tools/xlcxx.py
 create mode 100644 buildtools/wafadmin/Utils.py
 create mode 100644 buildtools/wafadmin/__init__.py
 create mode 100644 buildtools/wafadmin/ansiterm.py
 create mode 100644 buildtools/wafadmin/pproc.py
 create mode 100644 buildtools/wafadmin/py3kfixes.py


Changeset truncated at 500 lines:

diff --git a/buildtools/README b/buildtools/README
new file mode 100644
index 0000000..eab0382
--- /dev/null
+++ b/buildtools/README
@@ -0,0 +1,12 @@
+See http://code.google.com/p/waf/ for more information on waf
+
+You can get a svn copy of the upstream source with:
+
+  svn checkout http://waf.googlecode.com/svn/trunk/ waf-read-only
+
+Samba currently uses waf 1.5, which can be found at:
+
+  http://waf.googlecode.com/svn/branches/waf-1.5
+
+To update the current copy of waf, use the update-waf.sh script in this
+directory.
diff --git a/buildtools/bin/README b/buildtools/bin/README
deleted file mode 100644
index 9ef8a1f..0000000
--- a/buildtools/bin/README
+++ /dev/null
@@ -1,16 +0,0 @@
-This copy of waf-svn is taken from the git mirror of waf
-at:
-
-  git://git.samba.org/tridge/waf-svn.git
-
-using the waf-samba branch
-
-It was built using the command:
-
-  ./waf-light --zip-type=gz --make-waf
-
-See http://code.google.com/p/waf/ for more information on waf
-
-You can get a svn copy of the upstream source with:
-
-  svn checkout http://waf.googlecode.com/svn/trunk/ waf-read-only
diff --git a/buildtools/bin/waf b/buildtools/bin/waf
deleted file mode 120000
index 1e5b242..0000000
--- a/buildtools/bin/waf
+++ /dev/null
@@ -1 +0,0 @@
-waf-svn
\ No newline at end of file
diff --git a/buildtools/bin/waf b/buildtools/bin/waf
new file mode 100755
index 0000000..db6a7d3
--- /dev/null
+++ b/buildtools/bin/waf
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+# encoding: ISO-8859-1
+# Thomas Nagy, 2005-2010
+
+"""
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import os, sys
+if sys.hexversion<0x203000f: raise ImportError("Waf requires Python >= 2.3")
+
+if 'PSYCOWAF' in os.environ:
+	try:import psyco;psyco.full()
+	except:pass
+
+VERSION="1.5.19"
+REVISION="x"
+INSTALL="x"
+C1='x'
+C2='x'
+cwd = os.getcwd()
+join = os.path.join
+
+WAF='waf'
+def b(x):
+	return x
+
+if sys.hexversion>0x300000f:
+	WAF='waf3'
+	def b(x):
+		return x.encode()
+
+def err(m):
+	print(('\033[91mError: %s\033[0m' % m))
+	sys.exit(1)
+
+def test(dir):
+	try: os.stat(join(dir, 'wafadmin')); return os.path.abspath(dir)
+	except OSError: pass
+
+def find_lib():
+	return os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
+
+wafdir = find_lib()
+w = join(wafdir, 'wafadmin')
+t = join(w, 'Tools')
+f = join(w, '3rdparty')
+sys.path = [w, t, f] + sys.path
+
+if __name__ == '__main__':
+	import Scripting
+	Scripting.prepare(t, cwd, VERSION, wafdir)
+
diff --git a/buildtools/bin/waf-svn b/buildtools/bin/waf-svn
deleted file mode 100755
index 6d54d5f..0000000
Binary files a/buildtools/bin/waf-svn and /dev/null differ
diff --git a/buildtools/update-waf.sh b/buildtools/update-waf.sh
new file mode 100755
index 0000000..cdb56c6
--- /dev/null
+++ b/buildtools/update-waf.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Update our copy of waf
+
+TARGETDIR="`dirname $0`"
+WORKDIR="`mktemp -d`"
+
+mkdir -p "$WORKDIR"
+
+git clone https://code.google.com/p/waf.waf15/ "$WORKDIR"
+
+rsync -C -avz --delete "$WORKDIR/wafadmin/" "$TARGETDIR/wafadmin/"
+
+rm -rf "$WORKDIR"
diff --git a/buildtools/wafadmin/3rdparty/ParallelDebug.py b/buildtools/wafadmin/3rdparty/ParallelDebug.py
new file mode 100644
index 0000000..9d0493e
--- /dev/null
+++ b/buildtools/wafadmin/3rdparty/ParallelDebug.py
@@ -0,0 +1,299 @@
+#! /usr/bin/env python
+# encoding: utf-8
+# Thomas Nagy, 2007-2010 (ita)
+
+"""
+debugging helpers for parallel compilation, outputs
+a svg file in the build directory
+"""
+
+import os, time, sys, threading
+try: from Queue import Queue
+except: from queue import Queue
+import Runner, Options, Utils, Task, Logs
+from Constants import *
+
+#import random
+#random.seed(100)
+
+def set_options(opt):
+	opt.add_option('--dtitle', action='store', default='Parallel build representation for %r' % ' '.join(sys.argv),
+		help='title for the svg diagram', dest='dtitle')
+	opt.add_option('--dwidth', action='store', type='int', help='diagram width', default=1000, dest='dwidth')
+	opt.add_option('--dtime', action='store', type='float', help='recording interval in seconds', default=0.009, dest='dtime')
+	opt.add_option('--dband', action='store', type='int', help='band width', default=22, dest='dband')
+	opt.add_option('--dmaxtime', action='store', type='float', help='maximum time, for drawing fair comparisons', default=0, dest='dmaxtime')
+
+# red   #ff4d4d
+# green #4da74d
+# lila  #a751ff
+
+color2code = {
+	'GREEN'  : '#4da74d',
+	'YELLOW' : '#fefe44',
+	'PINK'   : '#a751ff',
+	'RED'    : '#cc1d1d',
+	'BLUE'   : '#6687bb',
+	'CYAN'   : '#34e2e2',
+
+}
+
+mp = {}
+info = [] # list of (text,color)
+
+def map_to_color(name):
+	if name in mp:
+		return mp[name]
+	try:
+		cls = Task.TaskBase.classes[name]
+	except KeyError:
+		return color2code['RED']
+	if cls.color in mp:
+		return mp[cls.color]
+	if cls.color in color2code:
+		return color2code[cls.color]
+	return color2code['RED']
+
+def loop(self):
+	while 1:
+		tsk=Runner.TaskConsumer.ready.get()
+		tsk.master.set_running(1, id(threading.currentThread()), tsk)
+		Runner.process_task(tsk)
+		tsk.master.set_running(-1, id(threading.currentThread()), tsk)
+Runner.TaskConsumer.loop = loop
+
+
+old_start = Runner.Parallel.start
+def do_start(self):
+        print Options.options
+	try:
+		Options.options.dband
+	except AttributeError:
+		raise ValueError('use def options(opt): opt.load("parallel_debug")!')
+
+	self.taskinfo = Queue()
+	old_start(self)
+	process_colors(self)
+Runner.Parallel.start = do_start
+
+def set_running(self, by, i, tsk):
+	self.taskinfo.put( (i, id(tsk), time.time(), tsk.__class__.__name__, self.processed, self.count, by)  )
+Runner.Parallel.set_running = set_running
+
+def name2class(name):
+	return name.replace(' ', '_').replace('.', '_')
+
+def process_colors(producer):
+	# first, cast the parameters
+	tmp = []
+	try:
+		while True:
+			tup = producer.taskinfo.get(False)
+			tmp.append(list(tup))
+	except:
+		pass
+
+	try:
+		ini = float(tmp[0][2])
+	except:
+		return
+
+	if not info:
+		seen = []
+		for x in tmp:
+			name = x[3]
+			if not name in seen:
+				seen.append(name)
+			else:
+				continue
+
+			info.append((name, map_to_color(name)))
+		info.sort(key=lambda x: x[0])
+
+	thread_count = 0
+	acc = []
+	for x in tmp:
+		thread_count += x[6]
+		acc.append("%d %d %f %r %d %d %d" % (x[0], x[1], x[2] - ini, x[3], x[4], x[5], thread_count))
+	f = open('pdebug.dat', 'w')
+	#Utils.write('\n'.join(acc))
+	f.write('\n'.join(acc))
+
+	tmp = [lst[:2] + [float(lst[2]) - ini] + lst[3:] for lst in tmp]
+
+	st = {}
+	for l in tmp:
+		if not l[0] in st:
+			st[l[0]] = len(st.keys())
+	tmp = [  [st[lst[0]]] + lst[1:] for lst in tmp ]
+	THREAD_AMOUNT = len(st.keys())
+
+	st = {}
+	for l in tmp:
+		if not l[1] in st:
+			st[l[1]] = len(st.keys())
+	tmp = [  [lst[0]] + [st[lst[1]]] + lst[2:] for lst in tmp ]
+
+
+	BAND = Options.options.dband
+
+	seen = {}
+	acc = []
+	for x in range(len(tmp)):
+		line = tmp[x]
+		id = line[1]
+
+		if id in seen:
+			continue
+		seen[id] = True
+
+		begin = line[2]
+		thread_id = line[0]
+		for y in range(x + 1, len(tmp)):
+			line = tmp[y]
+			if line[1] == id:
+				end = line[2]
+				#print id, thread_id, begin, end
+				#acc.append(  ( 10*thread_id, 10*(thread_id+1), 10*begin, 10*end ) )
+				acc.append( (BAND * begin, BAND*thread_id, BAND*end - BAND*begin, BAND, line[3]) )
+				break
+
+	if Options.options.dmaxtime < 0.1:
+		gwidth = 1
+		for x in tmp:
+			m = BAND * x[2]
+			if m > gwidth:
+				gwidth = m
+	else:
+		gwidth = BAND * Options.options.dmaxtime
+
+	ratio = float(Options.options.dwidth) / gwidth
+	gwidth = Options.options.dwidth
+
+	gheight = BAND * (THREAD_AMOUNT + len(info) + 1.5)
+
+	out = []
+
+	out.append("""<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
+<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\"
+\"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">
+<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.0\"
+   x=\"%r\" y=\"%r\" width=\"%r\" height=\"%r\"
+   id=\"svg602\" xml:space=\"preserve\">
+
+<style type='text/css' media='screen'>
+    g.over rect  { stroke:#FF0000; fill-opacity:0.4 }
+</style>
+
+<script type='text/javascript'><![CDATA[
+    var svg  = document.getElementsByTagName('svg')[0];
+    var svgNS = svg.getAttribute('xmlns');
+    svg.addEventListener('mouseover',function(e){
+      var g = e.target.parentNode;
+      var x = document.getElementById('r_'+g.id);
+      if (x) {
+         g.setAttribute('class', g.getAttribute('class')+' over');
+         x.setAttribute('class', x.getAttribute('class')+' over');
+         showInfo(e, g.id);
+      }
+    },false);
+    svg.addEventListener('mouseout',function(e){
+      var g = e.target.parentNode;
+      var x = document.getElementById('r_'+g.id);
+      if (x) {
+         g.setAttribute('class',g.getAttribute('class').replace(' over',''));
+         x.setAttribute('class',x.getAttribute('class').replace(' over',''));
+         hideInfo(e);
+      }
+    },false);
+
+function showInfo(evt, txt) {
+    tooltip = document.getElementById('tooltip');
+
+    var t = document.getElementById('tooltiptext');
+    t.firstChild.data = txt;
+
+    var x = evt.clientX+10;
+    if (x > 200) { x -= t.getComputedTextLength() + 16; }
+    var y = evt.clientY+30;
+    tooltip.setAttribute("transform", "translate(" + x + "," + y + ")");
+    tooltip.setAttributeNS(null,"visibility","visible");
+
+    var r = document.getElementById('tooltiprect');
+    r.setAttribute('width', t.getComputedTextLength()+6)
+}
+
+
+function hideInfo(evt) {
+    tooltip = document.getElementById('tooltip');
+    tooltip.setAttributeNS(null,"visibility","hidden");
+}
+
+]]></script>
+
+<!-- inkscape requires a big rectangle or it will not export the pictures properly -->
+<rect
+   x='%r' y='%r'
+   width='%r' height='%r' z-index='10'
+   style=\"font-size:10;fill:#ffffff;fill-opacity:0.01;fill-rule:evenodd;stroke:#ffffff;\"
+   />\n
+
+""" % (0, 0, gwidth + 4, gheight + 4,   0, 0, gwidth + 4, gheight + 4))
+
+	# main title
+	if Options.options.dtitle:
+		out.append("""<text x="%d" y="%d" style="font-size:15px; text-anchor:middle; font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans">%s</text>
+""" % (gwidth/2, gheight - 5, Options.options.dtitle))
+
+	# the rectangles
+	groups = {}
+	for (x, y, w, h, clsname) in acc:
+		try:
+			groups[clsname].append((x, y, w, h))
+		except:
+			groups[clsname] = [(x, y, w, h)]
+
+	for cls in groups:
+
+		out.append("<g id='%s'>\n" % name2class(cls))
+
+		for (x, y, w, h) in groups[cls]:
+			out.append("""   <rect
+   x='%r' y='%r'
+   width='%r' height='%r' z-index='11'
+   style=\"font-size:10;fill:%s;fill-rule:evenodd;stroke:#000000;stroke-width:0.2px;\"
+   />\n""" % (2 + x*ratio, 2 + y, w*ratio, h, map_to_color(cls)))
+
+		out.append("</g>\n")
+
+	# output the caption
+	cnt = THREAD_AMOUNT
+
+	for (text, color) in info:
+		# caption box
+		b = BAND/2
+		out.append("""<g id='r_%s'><rect
+		x='%r' y='%r'
+		width='%r' height='%r'
+		style=\"font-size:10;fill:%s;fill-rule:evenodd;stroke:#000000;stroke-width:0.2px;\"
+  />\n""" %                       (name2class(text), 2 + BAND,     5 + (cnt + 0.5) * BAND, b, b, color))
+
+		# caption text
+		out.append("""<text
+   style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+   x="%r" y="%d">%s</text></g>\n""" % (2 + 2 * BAND, 5 + (cnt + 0.5) * BAND + 10, text))
+		cnt += 1
+
+	out.append("""
+<g transform="translate(0,0)" visibility="hidden" id="tooltip">
+  <rect id="tooltiprect" y="-15" x="-3" width="1" height="20" style="stroke:black;fill:#edefc2;stroke-width:1"/>
+  <text id="tooltiptext" style="font-family:Arial; font-size:12;fill:black;"> </text>
+</g>""")
+
+	out.append("\n</svg>")
+
+	#node = producer.bld.path.make_node('pdebug.svg')
+	f = open('pdebug.svg', 'w')
+	f.write("".join(out))
+
+
diff --git a/buildtools/wafadmin/3rdparty/batched_cc.py b/buildtools/wafadmin/3rdparty/batched_cc.py
new file mode 100644
index 0000000..8e31074
--- /dev/null
+++ b/buildtools/wafadmin/3rdparty/batched_cc.py
@@ -0,0 +1,183 @@
+#!/usr/bin/env python
+# encoding: utf-8
+# Thomas Nagy, 2006 (ita)
+
+"""
+Batched builds - compile faster
+instead of compiling object files one by one, c/c++ compilers are often able to compile at once:
+cc -c ../file1.c ../file2.c ../file3.c
+
+Files are output on the directory where the compiler is called, and dependencies are more difficult
+to track (do not run the command on all source files if only one file changes)
+
+As such, we do as if the files were compiled one by one, but no command is actually run:
+replace each cc/cpp Task by a TaskSlave
+A new task called TaskMaster collects the signatures from each slave and finds out the command-line
+to run.
+
+To set this up, the method ccroot::create_task is replaced by a new version, to enable batched builds
+it is only necessary to import this module in the configuration (no other change required)
+"""
+
+MAX_BATCH = 50
+MAXPARALLEL = False
+
+EXT_C = ['.c', '.cc', '.cpp', '.cxx']
+
+import os, threading
+import TaskGen, Task, ccroot, Build, Logs
+from TaskGen import extension, feature, before
+from Constants import *
+
+cc_str = '${CC} ${CCFLAGS} ${CPPFLAGS} ${_CCINCFLAGS} ${_CCDEFFLAGS} -c ${SRCLST}'
+cc_fun = Task.compile_fun_noshell('batched_cc', cc_str)[0]
+
+cxx_str = '${CXX} ${CXXFLAGS} ${CPPFLAGS} ${_CXXINCFLAGS} ${_CXXDEFFLAGS} -c ${SRCLST}'


-- 
Samba Shared Repository


More information about the samba-cvs mailing list