]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
buildman: Show 'make' command line when -V is used
authorSimon Glass <sjg@chromium.org>
Fri, 6 Feb 2015 05:06:12 +0000 (22:06 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 18 Apr 2015 22:24:24 +0000 (16:24 -0600)
When a verbose build it selected, show the make command before the output of
that command.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/buildman/builder.py
tools/buildman/builderthread.py

index 54f3292208a9f0ccf64a71758b2040f912880fce..72353b9104d4f209ea64cb66a2b9f11093315304 100644 (file)
@@ -335,6 +335,9 @@ class Builder:
         cmd = [self.gnu_make] + list(args)
         result = command.RunPipe([cmd], capture=True, capture_stderr=True,
                 cwd=cwd, raise_on_error=False, **kwargs)
+        if self.verbose_build:
+            result.stdout = '%s\n' % (' '.join(cmd)) + result.stdout
+            result.combined = '%s\n' % (' '.join(cmd)) + result.combined
         return result
 
     def ProcessResult(self, result):
index efb62f16d7020793d6f24439fd34c46df05134db..6ad240d606978218aac92b8cf53125e947d7be77 100644 (file)
@@ -209,14 +209,17 @@ class BuilderThread(threading.Thread):
                 if do_config:
                     result = self.Make(commit, brd, 'mrproper', cwd,
                             'mrproper', *args, env=env)
+                    config_out = result.combined
                     result = self.Make(commit, brd, 'config', cwd,
                             *(args + config_args), env=env)
-                    config_out = result.combined
+                    config_out += result.combined
                     do_config = False   # No need to configure next time
                 if result.return_code == 0:
                     result = self.Make(commit, brd, 'build', cwd, *args,
                             env=env)
                 result.stderr = result.stderr.replace(src_dir + '/', '')
+                if self.builder.verbose_build:
+                    result.stdout = config_out + result.stdout
             else:
                 result.return_code = 1
                 result.stderr = 'No tool chain for %s\n' % brd.arch