diff options
author | Dave Chinner <david@fromorbit.com> | 2010-01-21 09:09:19 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2010-01-21 09:09:19 +1100 |
commit | e124866cfc0cf040d952f9c46194b248961dcdf3 (patch) | |
tree | 776af668b0b355ff83cdae3e1e71141447006aec | |
parent | fbc58724a6a3c07e6c945d8d30e0cab95d428eb0 (diff) | |
download | xfsdump-dev-e124866cfc0cf040d952f9c46194b248961dcdf3.tar.gz |
xfsdump: Clean up build output
We don't need to see every compiler command line for every file that
is compiled. This makes it hard to see warnings and errors during
compile. For progress notification, we really only need to see the
directory/file being operated on.
Turn down the verbosity of output by suppressing various make output
and provide better overall visibility of which directory is being
operated on, what the operation is and what is being done to the
files by the build/clean process.
The old style verbose builds can still be run via "make V=1 ..."
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | Makefile | 39 | ||||
-rw-r--r-- | doc/Makefile | 3 | ||||
-rw-r--r-- | dump/Makefile | 6 | ||||
-rw-r--r-- | include/buildmacros | 10 | ||||
-rw-r--r-- | include/buildrules | 30 | ||||
-rw-r--r-- | invutil/Makefile | 6 | ||||
-rw-r--r-- | restore/Makefile | 6 |
7 files changed, 67 insertions, 33 deletions
@@ -2,6 +2,21 @@ # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. # +ifeq ("$(origin V)", "command line") + BUILD_VERBOSE = $(V) +endif +ifndef BUILD_VERBOSE + BUILD_VERBOSE = 0 +endif + +ifeq ($(BUILD_VERBOSE),1) + Q = +else + Q = @ +endif + +MAKEOPTS = --no-print-directory Q=$(Q) + TOPDIR = . HAVE_BUILDDEFS = $(shell test -f $(TOPDIR)/include/builddefs && echo yes || echo no) @@ -31,9 +46,9 @@ SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS) default: include/builddefs include/config.h ifeq ($(HAVE_BUILDDEFS), no) - $(MAKE) -C . $@ + $(Q)$(MAKE) $(MAKEOPTS) -C . $@ else - $(MAKE) $(SUBDIRS) + $(Q)$(MAKE) $(MAKEOPTS) $(SUBDIRS) endif # tool/lib dependencies @@ -74,10 +89,10 @@ install: default $(addsuffix -install,$(SUBDIRS)) install-dev: default $(addsuffix -install-dev,$(SUBDIRS)) %-install: - $(MAKE) -C $* install + $(Q)$(MAKE) -C $* install %-install-dev: - $(MAKE) -C $* install-dev + $(Q)$(MAKE) -C $* install-dev distclean: clean rm -f $(LDIRT) @@ -90,19 +105,19 @@ realclean: distclean # dist: include/builddefs include/config.h default ifeq ($(HAVE_BUILDDEFS), no) - $(MAKE) -C . $@ + $(Q)$(MAKE) $(MAKEOPTS) -C . $@ else - $(MAKE) $(SRCTAR) + $(Q)$(MAKE) $(MAKEOPTS) $(SRCTAR) endif deb: include/builddefs include/config.h ifeq ($(HAVE_BUILDDEFS), no) - $(MAKE) -C . $@ + $(MAKE) $(MAKEOPTS) -C . $@ else - $(MAKE) $(SRCDIR) - $(MAKE) -C po - $(MAKE) source-link - cd $(SRCDIR) && dpkg-buildpackage + $(Q)$(MAKE) $(MAKEOPTS) $(SRCDIR) + $(Q)$(MAKE) $(MAKEOPTS) -C po + $(Q)$(MAKE) $(MAKEOPTS) source-link + $(Q)cd $(SRCDIR) && dpkg-buildpackage endif $(SRCDIR) : $(_FORCE) @@ -110,6 +125,6 @@ $(SRCDIR) : $(_FORCE) mkdir -p $@ $(SRCTAR) : default $(SRCDIR) - $(MAKE) source-link + $(Q)$(MAKE) $(MAKEOPTS) source-link unset TAPE; $(TAR) -cf - $(SRCDIR) | $(ZIP) --best > $@ && \ echo Wrote: $@ diff --git a/doc/Makefile b/doc/Makefile index 85671721..dac0401d 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -17,7 +17,8 @@ default: CHANGES.gz include $(BUILDRULES) CHANGES.gz: - $(ZIP) --best -c < CHANGES > $@ + @echo " [ZIP] $@" + $(Q)$(ZIP) --best -c < CHANGES > $@ install: default $(INSTALL) -m 755 -d $(PKG_DOC_DIR) diff --git a/dump/Makefile b/dump/Makefile index a24fde3e..a0c74dc1 100644 --- a/dump/Makefile +++ b/dump/Makefile @@ -106,7 +106,9 @@ install: default install-dev: $(COMMINCL) $(COMMON): - $(RM) $@; $(LN_S) ../common/$@ $@ + @echo " [LN] $@" + $(Q)$(RM) $@; $(LN_S) ../common/$@ $@ $(INVINCL) $(INVCOMMON): - $(RM) $@; $(LN_S) ../inventory/$@ $@ + @echo " [LN] $@" + $(Q)$(RM) $@; $(LN_S) ../inventory/$@ $@ diff --git a/include/buildmacros b/include/buildmacros index ea769fa2..a7eebe6a 100644 --- a/include/buildmacros +++ b/include/buildmacros @@ -13,7 +13,7 @@ LDFLAGS += $(LOADERFLAGS) $(LLDFLAGS) LTLDFLAGS += $(LOADERFLAGS) LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB) -MAKEOPTS = --no-print-directory +MAKEOPTS = --no-print-directory Q=$(Q) SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES) DEPDIRT = dep dep.bak @@ -45,10 +45,10 @@ LIBNAME = $(basename $(LTLIBRARY)) LTOBJECTS = $(OBJECTS:.o=.lo) LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -LTLINK = $(LIBTOOL) --tag=CC --mode=link $(CC) -LTEXEC = $(LIBTOOL) --mode=execute -LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CCF) +LTLINK = $(LIBTOOL) --quiet --tag=CC --mode=link $(CC) +LTEXEC = $(LIBTOOL) --quiet --mode=execute +LTINSTALL = $(LIBTOOL) --quiet --mode=install $(INSTALL) +LTCOMPILE = $(LIBTOOL) --quiet --tag=CC --mode=compile $(CCF) ifeq ($(ENABLE_SHARED),yes) LTLDFLAGS += -rpath $(PKG_ROOT_LIB_DIR) diff --git a/include/buildrules b/include/buildrules index 2e3d3bbc..a9eb092d 100644 --- a/include/buildrules +++ b/include/buildrules @@ -7,10 +7,11 @@ _BUILDRULES_INCLUDED_ = 1 include $(TOPDIR)/include/builddefs clean clobber : $(addsuffix -clean,$(SUBDIRS)) - rm -f $(DIRT) - rm -fr $(DIRDIRT) + @rm -f $(DIRT) + @rm -fr $(DIRDIRT) %-clean: - $(MAKE) -C $* clean + @echo "Cleaning $*" + $(Q)$(MAKE) $(MAKEOPTS) -q -C $* clean || $(MAKE) $(MAKEOPTS) -C $* clean # Never blow away subdirs ifdef SUBDIRS @@ -18,7 +19,8 @@ ifdef SUBDIRS .PHONY: $(SUBDIRS) $(SUBDIRS): - $(MAKE) -C $@ + @echo "Building $@" + $(Q)$(MAKE) $(MAKEOPTS) -q -C $@ || $(MAKE) $(MAKEOPTS) -C $@ endif source-link: @@ -38,20 +40,29 @@ source-link: ifdef LTCOMMAND $(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES) - $(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS) + @echo " [LD] $@" + $(Q)$(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS) endif ifdef LTLIBRARY $(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS) - $(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS) + @echo " [LD] $@" + $(Q)$(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS) %.lo: %.c - $(LTCOMPILE) -c $< + @echo " [CC] $@" + $(Q)$(LTCOMPILE) -c $< +else +%.o: %.c + @echo " [CC] $@" + $(Q)$(CC) $(CFLAGS) -c $< + endif ifdef POTHEAD $(POTHEAD): $(XGETTEXTFILES) - $(XGETTEXT) --language=C --keyword=_ --keyword=N_ -o $@ $(XGETTEXTFILES) + @echo " [GETTXT] $@" + $(Q)$(XGETTEXT) --language=C --keyword=_ --keyword=N_ -o $@ $(XGETTEXTFILES) # Update translations update-po: $(POTHEAD) $(wildcard $(TOPDIR)/po/*.po) @@ -70,7 +81,8 @@ update-po: $(POTHEAD) $(wildcard $(TOPDIR)/po/*.po) done %.mo: %.po - $(MSGFMT) -c --statistics -o $@ $< + @echo " [MSGFMT] $@" + $(Q)$(MSGFMT) -c --statistics -o $@ $< endif endif # _BUILDRULES_INCLUDED_ diff --git a/invutil/Makefile b/invutil/Makefile index 5ea07199..9e361f11 100644 --- a/invutil/Makefile +++ b/invutil/Makefile @@ -71,7 +71,9 @@ install: default install-dev: $(COMMINCL) $(COMMON): - $(RM) $@; $(LN_S) ../common/$@ $@ + @echo " [LN] $@" + $(Q)$(RM) $@; $(LN_S) ../common/$@ $@ $(INVINCL) $(INVCOMMON): - $(RM) $@; $(LN_S) ../inventory/$@ $@ + @echo " [LN] $@" + $(Q)$(RM) $@; $(LN_S) ../inventory/$@ $@ diff --git a/restore/Makefile b/restore/Makefile index 3890af5b..a587632f 100644 --- a/restore/Makefile +++ b/restore/Makefile @@ -118,7 +118,9 @@ install: default install-dev: $(COMMINCL) $(COMMON): - $(RM) $@; $(LN_S) ../common/$@ $@ + @echo " [LN] $@" + $(Q)$(RM) $@; $(LN_S) ../common/$@ $@ $(INVINCL) $(INVCOMMON): - $(RM) $@; $(LN_S) ../inventory/$@ $@ + @echo " [LN] $@" + $(Q)$(RM) $@; $(LN_S) ../inventory/$@ $@ |