build: support make V=1 for verbose build
authorAndrew Tridgell <tridge@samba.org>
Sun, 18 Apr 2010 09:41:47 +0000 (19:41 +1000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 18 Apr 2010 11:08:48 +0000 (21:08 +1000)
this also adds support for other options, such as "make TESTS=testpattern"

buildtools/wafsamba/samba_utils.py

index a3448b702a4863c24b13e14dfd3eb93c51dd9e65..cbea755f5b29cc4405b900286ab52de29a3ca6bf 100644 (file)
@@ -449,7 +449,16 @@ def CHECK_MAKEFLAGS(bld):
     jobs_set = False
     for opt in makeflags.split():
         # options can come either as -x or as x
-        if opt[0] != '-':
+        if opt[0:2] == 'V=':
+            Options.options.verbose = Logs.verbose = int(opt[2:])
+            if Logs.verbose > 0:
+               Logs.zones = ['runner']
+            if Logs.verbose > 2:
+                Logs.zones = ['*']
+        elif opt[0].isupper() and opt.find('=') != -1:
+            loc = opt.find('=')
+            setattr(Options.options, opt[0:loc], opt[loc+1:])
+        elif opt[0] != '-':
             for v in opt:
                 if v == 'j':
                     jobs_set = True