[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Wed Jan 5 06:30:01 MST 2011


The branch, master has been updated
       via  0185f66 script/autobuild.py: add pidl tests
       via  38c3e58 script/autobuild.py: fix path to clean-source-tree.sh from within lib/tevent/
       via  5d8f916 pidl/wscript: let the developer use the standalone build with yapp
       via  e0a9b58 buildtools/wafsamba: import 'sys' and 'Logs' if we use them
      from  d89e762 pidl:Samba4/Python: avoid ';;' in generated C code.

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


- Log -----------------------------------------------------------------
commit 0185f660c0557e716fd7491b6095349e1323c8a8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 5 09:30:48 2011 +0100

    script/autobuild.py: add pidl tests
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Wed Jan  5 14:29:54 CET 2011 on sn-devel-104

commit 38c3e5894565fe3f078b459387e56ee352c66665
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 5 12:43:43 2011 +0100

    script/autobuild.py: fix path to clean-source-tree.sh from within lib/tevent/
    
    metze

commit 5d8f916619b5324e33d4a1bc3c97d6cc784f4bb9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 5 12:00:01 2011 +0100

    pidl/wscript: let the developer use the standalone build with yapp
    
    Waf isn't happy when files in the source directory are changed.
    
    metze

commit e0a9b58de8bd86122d17c0330cb1f0330207c023
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 5 12:16:15 2011 +0100

    buildtools/wafsamba: import 'sys' and 'Logs' if we use them
    
    We should avoid generating a backtrace in a normal
    error case, just because sys.exit(1) isn't known.
    
    metze

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

Summary of changes:
 buildtools/wafsamba/pkgconfig.py      |    2 +-
 buildtools/wafsamba/samba_autoconf.py |    2 +-
 buildtools/wafsamba/samba_bundled.py  |    2 +-
 buildtools/wafsamba/samba_deps.py     |    2 +-
 buildtools/wafsamba/samba_pidl.py     |    2 +-
 buildtools/wafsamba/wafsamba.py       |    2 +-
 buildtools/wafsamba/wscript           |    2 +-
 pidl/wscript                          |   32 ++++++++++++++++++++++----------
 script/autobuild.py                   |   11 ++++++++++-
 9 files changed, 39 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/pkgconfig.py b/buildtools/wafsamba/pkgconfig.py
index 4abf8d6..09bfcb9 100644
--- a/buildtools/wafsamba/pkgconfig.py
+++ b/buildtools/wafsamba/pkgconfig.py
@@ -1,6 +1,6 @@
 # handle substitution of variables in pc files
 
-import Build
+import Build, sys, Logs
 from samba_utils import *
 
 def subst_at_vars(task):
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 1babe7b..91d8a56 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -1,6 +1,6 @@
 # a waf tool to add autoconf-like macros to the configure section
 
-import Build, os, Options, preproc, Logs
+import Build, os, sys, Options, preproc, Logs
 import string
 from Configure import conf
 from samba_utils import *
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index 9e02ca4..27234fb 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -1,7 +1,7 @@
 # functions to support bundled libraries
 
 from Configure import conf
-import Logs
+import sys, Logs
 from samba_utils import *
 
 def PRIVATE_NAME(bld, name, private_extension, private_library):
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index 6bd2cca..c4a871e 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -1,6 +1,6 @@
 # Samba automatic dependency handling and project rules
 
-import Build, os, re, Environment, Logs, time
+import Build, os, sys, re, Environment, Logs, time
 from samba_utils import *
 from samba_autoconf import *
 from samba_bundled import BUILTIN_LIBRARY
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py
index d5ac217..2770728 100644
--- a/buildtools/wafsamba/samba_pidl.py
+++ b/buildtools/wafsamba/samba_pidl.py
@@ -1,7 +1,7 @@
 # waf build tool for building IDL files with pidl
 
 from TaskGen import before
-import Build, os
+import Build, os, sys, Logs
 from samba_utils import *
 
 def SAMBA_PIDL(bld, pname, source,
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index c532c4b..571cd48 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -1,7 +1,7 @@
 # a waf tool to add autoconf-like macros to the configure section
 # and for SAMBA_ macros for building libraries, binaries etc
 
-import Build, os, Options, Task, Utils, cc, TaskGen, fnmatch, re, shutil, Logs, Constants
+import Build, os, sys, Options, Task, Utils, cc, TaskGen, fnmatch, re, shutil, Logs, Constants
 from Configure import conf
 from Logs import debug
 from samba_utils import SUBST_VARS_RECURSIVE
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index d4e103e..ad5b938 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -2,7 +2,7 @@
 
 # this is a base set of waf rules that everything else pulls in first
 
-import sys, wafsamba, Configure
+import sys, wafsamba, Configure, Logs
 import Options, os, preproc
 from samba_utils import *
 from optparse import SUPPRESS_HELP
diff --git a/pidl/wscript b/pidl/wscript
index 8cb0c6f..150ef41 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-import os
+import os, sys, Logs
 from samba_utils import MODE_755
 
 def set_options(opt):
@@ -46,8 +46,6 @@ def build(bld):
 
     blib_bld = os.path.join(bld.srcnode.abspath(bld.env), 'pidl/blib')
 
-    link_command = 'rm -rf blib && ln -fs blib %s' % blib_bld
-    
     bld.SET_BUILD_GROUP('final')
     if 'POD2MAN' in bld.env and bld.env['POD2MAN'] != '':
         for src, manpage in pidl_manpages.iteritems():
@@ -57,15 +55,29 @@ def build(bld):
                 install_path=os.path.dirname(bld.EXPAND_VARIABLES('${MANDIR}/'+manpage)),
                 target=os.path.basename(manpage))
 
-    # we want to prefer the git version of the parsers if we can. Only if the
-    # source has changed do we want to re-run yapp
+    # we want to prefer the git version of the parsers if we can.
+    # Only if the source has changed do we want to re-run yapp
+    # But we force the developer to use the pidl standalone build
+    # to regenerate the files.
     need_yapp_build = ('YAPP' in bld.env and (
         bld.IS_NEWER('idl.yp', 'lib/Parse/Pidl/IDL.pm') or
         bld.IS_NEWER('expr.yp', 'lib/Parse/Pidl/Expr.pm')))
 
     if need_yapp_build:
-        t = bld.SAMBA_GENERATOR('pidl_parser',
-                                source='idl.yp expr.yp',
-                                target='lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm Makefile.PL',
-                                rule='cd ${pidl_srcdir} && ${LINK_COMMAND} && ${PERL} Makefile.PL && make lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm && rm -f Makefile Makefile.old && rm -f blib')
-        t.env.LINK_COMMAND = link_command
+        Logs.error('''
+Pidl grammar files have changed. Please use the pidl standalone build
+to regenerate them with yapp.
+
+$ cd pidl
+$ perl Makefile.PL
+$ make lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm
+$ git add lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm
+$ git commit
+
+If your 100% sure you haven't changed idl.yp and expr.yp
+try this to avoid this message:
+
+$ touch lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm
+''')
+        sys.exit(1)
+
diff --git a/script/autobuild.py b/script/autobuild.py
index c6959a2..3b11b39 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -68,8 +68,16 @@ tasks = {
                      ("make", "make -j", "text/plain"),
                      ("install", "make install", "text/plain"),
                      ("test", "make test", "text/plain"),
-                     ("check-clean-tree", "../script/clean-source-tree.sh", "text/plain"),
+                     ("check-clean-tree", "../../script/clean-source-tree.sh", "text/plain"),
                      ("clean", "make clean", "text/plain") ],
+
+    "pidl" : [ ("configure", "perl Makefile.PL PREFIX=${PREFIX_DIR}", "text/plain"),
+               ("touch", "touch *.yp", "text/plain"),
+               ("make", "make", "text/plain"),
+               ("test", "make test", "text/plain"),
+               ("install", "make install", "text/plain"),
+               ("check-clean-tree", "../script/clean-source-tree.sh", "text/plain"),
+               ("clean", "make clean", "text/plain") ],
 }
 
 retry_task = [ ( "retry",
@@ -138,6 +146,7 @@ class builder(object):
             return
         (self.stage, self.cmd, self.output_mime_type) = self.sequence[self.next]
         self.cmd = self.cmd.replace("${PREFIX}", "--prefix=%s" % self.prefix)
+        self.cmd = self.cmd.replace("${PREFIX_DIR}", "%s" % self.prefix)
 #        if self.output_mime_type == "text/x-subunit":
 #            self.cmd += " | %s --immediate" % (os.path.join(os.path.dirname(__file__), "selftest/format-subunit"))
         print '%s: [%s] Running %s' % (self.name, self.stage, self.cmd)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list