[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Fri Apr 9 04:32:34 MDT 2010


The branch, master has been updated
       via  0b8a3a4... build: no need to re-create the lib and bin symlinks if they exist
       via  5f90d32... build: added --picky-developer and --fatal-errors
      from  0d92dd1... s4-net: Cope with options without arguments.

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


- Log -----------------------------------------------------------------
commit 0b8a3a4036f3dfc59a39ae4b6364f93a66a40415
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Apr 9 20:30:44 2010 +1000

    build: no need to re-create the lib and bin symlinks if they exist
    
    this saves a few unlink/symlink calls for null builds

commit 5f90d3260be8f30e5d9ccd542aca1807d58d2443
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Apr 9 19:54:40 2010 +1000

    build: added --picky-developer and --fatal-errors
    
    Added configure options for --fatal-errors and --picky-developer. This
    removes -Wfatal-errors from the --enable-developer flags.

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

Summary of changes:
 buildtools/wafsamba/samba_autoconf.py |    8 +++++++-
 buildtools/wafsamba/samba_install.py  |    6 ++++++
 buildtools/wafsamba/wscript           |    6 ++++++
 3 files changed, 19 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 32c7463..4731a4e 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -541,9 +541,15 @@ def SAMBA_CONFIG_H(conf, path=None):
 
     if Options.options.developer:
         # we add these here to ensure that -Wstrict-prototypes is not set during configure
-        conf.ADD_CFLAGS('-Wall -g -Wfatal-errors -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k',
+        conf.ADD_CFLAGS('-Wall -g -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k',
                         testflags=True)
 
+    if Options.options.picky_developer:
+        conf.ADD_CFLAGS('-Werror', testflags=True)
+
+    if Options.options.fatal_errors:
+        conf.ADD_CFLAGS('-Wfatal-errors', testflags=True)
+
     if Options.options.pedantic:
         conf.ADD_CFLAGS('-W', testflags=True)
 
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index fee456a..df65da1 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -133,6 +133,9 @@ def symlink_lib(self):
     link_target = os.path.join(blddir, link_target)
 
     if os.path.lexists(link_target):
+        old_link = os.readlink(link_target)
+        if libpath == old_link:
+            return
         os.unlink(link_target)
     os.symlink(libpath, link_target)
 
@@ -150,5 +153,8 @@ def symlink_bin(self):
     bldpath = os.path.join(self.bld.env.BUILD_DIRECTORY, self.target)
 
     if os.path.lexists(bldpath):
+        old_link = os.readlink(bldpath)
+        if binpath == old_link:
+            return
         os.unlink(bldpath)
     os.symlink(binpath, bldpath)
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 9bef9b6..1ae6b97 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -45,6 +45,12 @@ def set_options(opt):
     opt.add_option('--enable-developer',
                    help=("Turn on developer warnings and debugging"),
                    action="store_true", dest='developer', default=False)
+    opt.add_option('--picky-developer',
+                   help=("Treat all warnings as errors (enable -Werror)"),
+                   action="store_true", dest='picky_developer', default=False)
+    opt.add_option('--fatal-errors',
+                   help=("Stop compilation on first error (enable -Wfatal-errors)"),
+                   action="store_true", dest='fatal_errors', default=False)
     opt.add_option('--enable-gccdeps',
                    help=("Enable use gcc -MD dependency module"),
                    action="store_true", dest='enable_gccdeps', default=False)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list