diff options
author | Gabe Black <gabeblack@chromium.org> | 2012-12-20 00:26:59 -0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-12-21 12:42:42 -0800 |
commit | 0aedbe1950225f8c8f3e535efa9575dc3a9c970d (patch) | |
tree | 2e43c9fcdf9a410d82e38b09b8918ddd599e5490 | |
parent | 90f78d22612f6255b174f21b0016d29c3805c721 (diff) | |
download | vboot-0aedbe1950225f8c8f3e535efa9575dc3a9c970d.tar.gz |
Add support for a V option which selects verbose Makefile output.
When V=1, the full command lines are printed. When V is not 1, then only a
small summary line is printed which shows what commands are being executed.
The command lines themselves are usually quite long and are overwhelming to
see fly by on the console. Abbreviated command lines are easier to read and
don't fill up your console so quickly.
This change is primarily targeted at vboot_fw.a and probably excludes some
things which could also be converted. The indentation between the action
string (OBJCOPY, CC, etc.) and the target is three spaces longer than "normal",
aka what's used in depthcharge, so that when this make is run from the other,
you can tell the difference between the commands run by each.
BUG=chrome-os-partner:8339
TEST=Built with and without V=1 and saw and did not see the full command
lines, respectively.
BRANCH=None
Change-Id: Ibee244c24dc44b8da109b8c23ac7273174836bb9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/40011
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
-rw-r--r-- | Makefile | 33 | ||||
-rw-r--r-- | build.mk | 6 | ||||
-rw-r--r-- | firmware/Makefile | 6 |
3 files changed, 27 insertions, 18 deletions
@@ -2,8 +2,13 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +ifneq ($(V),1) +Q := @ +endif + export FIRMWARE_ARCH export MOCK_TPM +export Q # This Makefile normally builds in a 'build' subdir, but use # @@ -97,7 +102,7 @@ SUBDIRS = firmware endif all: - set -e; \ + $(Q)set -e; \ for d in $(shell find ${SUBDIRS} -name '*.c' -exec dirname {} \; |\ sort -u); do \ newdir=${BUILD}/$$d; \ @@ -111,32 +116,32 @@ all: done libcgpt_cc: - mkdir -p ${BUILD}/cgpt ${BUILD}/firmware/lib/cgptlib ${BUILD}/firmware/stub - $(MAKE) -C cgpt libcgpt_cc + $(Q)mkdir -p ${BUILD}/cgpt ${BUILD}/firmware/lib/cgptlib ${BUILD}/firmware/stub + $(Q)$(MAKE) -C cgpt libcgpt_cc cgptmanager_tests: libcgpt_cc - mkdir -p ${BUILD}/tests - $(MAKE) -C tests cgptmanager_tests + $(Q)mkdir -p ${BUILD}/tests + $(Q)$(MAKE) -C tests cgptmanager_tests libdump_kernel_config: - mkdir -p ${BUILD}/utility - $(MAKE) -C utility $(DUMPKERNELCONFIGLIB) + $(Q)mkdir -p ${BUILD}/utility + $(Q)$(MAKE) -C utility $(DUMPKERNELCONFIGLIB) clean: - /bin/rm -rf ${BUILD} + $(Q)/bin/rm -rf ${BUILD} install: - $(MAKE) -C utility install - $(MAKE) -C cgpt install + $(Q)$(MAKE) -C utility install + $(Q)$(MAKE) -C cgpt install runtests: - $(MAKE) -C tests runtests + $(Q)$(MAKE) -C tests runtests runcgptmanagertests: - $(MAKE) -C tests runcgptmanagertests + $(Q)$(MAKE) -C tests runcgptmanagertests rbtest: - $(MAKE) -C tests rbtest + $(Q)$(MAKE) -C tests rbtest runbmptests: - $(MAKE) -C tests runbmptests + $(Q)$(MAKE) -C tests runbmptests @@ -15,9 +15,11 @@ ALL_DEPS = $(ALL_OBJS:%.o=%.o.d) all: ${ALL_OBJS} ${BUILD_ROOT}/%.o : %.c - $(CC) $(CFLAGS) $(INCLUDES) -MMD -MF $@.d -c -o $@ $< + @printf " CC $(subst $(BUILD_ROOT)/,,$(@))\n" + $(Q)$(CC) $(CFLAGS) $(INCLUDES) -MMD -MF $@.d -c -o $@ $< ${BUILD_ROOT}/%.o : %.cc - $(CXX) $(CFLAGS) $(INCLUDES) -MMD -MF $@.d -c -o $@ $< + @printf " CXX $(subst $(BUILD_ROOT)/,,$(@))\n" + $(Q)$(CXX) $(CFLAGS) $(INCLUDES) -MMD -MF $@.d -c -o $@ $< -include ${ALL_DEPS} diff --git a/firmware/Makefile b/firmware/Makefile index 8d8e2ee2..1612da95 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -129,5 +129,7 @@ endif include ../build.mk $(FWLIB) : $(LIB_OBJS) - rm -f $@ - ar qc $@ $^ + @printf " RM $(@))\n" + $(Q)rm -f $@ + @printf " AR $(@))\n" + $(Q)ar qc $@ $^ |