[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Wed Apr 14 07:39:22 MDT 2010


The branch, master has been updated
       via  bcd647f... Merge branch 'master' of ssh://git.samba.org/data/git/samba
       via  e81e057... build: try to honor MAKEFLAGS from make
      from  bc6a43a... s4:torture/rpc/winreg: fix compiler warnings

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


- Log -----------------------------------------------------------------
commit bcd647f943e391bdb98233c168d2b35e244e2bf4
Merge: e81e057b6d70d70616132593dc2acbfe77cb459c bc6a43aeb41fc5ccf3a34f2ec91e1328ae82d90e
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Apr 14 23:38:05 2010 +1000

    Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit e81e057b6d70d70616132593dc2acbfe77cb459c
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Apr 14 23:37:47 2010 +1000

    build: try to honor MAKEFLAGS from make
    
    This means "make -j" and "make -k" now do roughly what is expected
    
    make -j will use the number of CPUs on the system, regardless of the
    number after the -j (as MAKEFLAGS doesn't contain that value).
    
    make -k will will continue on errors

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

Summary of changes:
 buildtools/scripts/Makefile.waf    |    7 +------
 buildtools/wafsamba/samba_utils.py |   26 ++++++++++++++++++++++++++
 buildtools/wafsamba/wscript        |    1 +
 3 files changed, 28 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/scripts/Makefile.waf b/buildtools/scripts/Makefile.waf
index a1c4b69..ac5c013 100644
--- a/buildtools/scripts/Makefile.waf
+++ b/buildtools/scripts/Makefile.waf
@@ -1,11 +1,6 @@
 # simple makefile wrapper to run waf
 
-# default to using only 1 cpu, to be friendly to build
-# farm machines. I wonder how we get at the -jN option
-# from make to pass it to waf?
-JOBS=1
-
-WAF=JOBS=$(JOBS) BUILDTOOLS/bin/waf
+WAF=WAF_MAKE=1 BUILDTOOLS/bin/waf
 
 all:
 	$(WAF) build
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 7ee1663..bf051af 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -438,3 +438,29 @@ def RECURSE(ctx, directory):
     raise
 Options.Handler.RECURSE = RECURSE
 Build.BuildContext.RECURSE = RECURSE
+
+
+def CHECK_MAKEFLAGS(bld):
+    '''check for MAKEFLAGS environment variable in case we are being
+    called from a Makefile try to honor a few make command line flags'''
+    if not 'WAF_MAKE' in os.environ:
+        return
+    makeflags = os.environ.get('MAKEFLAGS')
+    jobs_set = False
+    for opt in makeflags.split():
+        # options can come either as -x or as x
+        if opt[0] != '-':
+            for v in opt:
+                if v == 'j':
+                    jobs_set = True
+                elif v == 'k':
+                    Options.options.keep = True                
+        elif opt == '-j':
+            jobs_set = True
+        elif opt == '-k':
+            Options.options.keep = True                
+    if not jobs_set:
+        # default to one job
+        Options.options.jobs = 1
+            
+Build.BuildContext.CHECK_MAKEFLAGS = CHECK_MAKEFLAGS
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index a395bfe..b4fcb99 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -226,6 +226,7 @@ def configure(conf):
 
 
 def build(bld):
+    bld.CHECK_MAKEFLAGS()
     bld.SETUP_BUILD_GROUPS()
     bld.ENFORCE_GROUP_ORDERING()
     bld.CHECK_PROJECT_RULES()


-- 
Samba Shared Repository


More information about the samba-cvs mailing list