Files
apfstests/include/buildrules
T
Dave Chinner 50f99d08ef xfstests: 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.

This patch only addresses the top level makefile and build rules; it
does not clean up the subdirectories - these will be addressed by a
followup patch. It also does not touch the dmapi section of the
xfstests build system.

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>
2010-01-20 10:26:01 +11:00

102 lines
2.1 KiB
Plaintext

#
# Copyright (c) 1999, 2001-2003 Silicon Graphics, Inc. All Rights Reserved.
#
ifndef _BUILDRULES_INCLUDED_
_BUILDRULES_INCLUDED_ = 1
include $(TOPDIR)/include/builddefs
clean clobber : $(addsuffix -clean,$(SUBDIRS))
$(Q)rm -f $(DIRT)
$(Q)rm -fr .libs
%-clean:
@echo "Cleaning $*"
$(Q)$(MAKE) $(MAKEOPTS) -q -C $* clean || $(MAKE) $(MAKEOPTS) -C $* clean
# Never blow away subdirs
ifdef SUBDIRS
.PRECIOUS: $(SUBDIRS)
.PHONY: $(SUBDIRS)
$(SUBDIRS):
@echo "Building $@"
$(Q)$(MAKE) $(MAKEOPTS) -q -C $@ || $(MAKE) $(MAKEOPTS) -C $@
endif
#
# Standard targets
#
ifdef LTCOMMAND
$(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES)
@echo " [LD] $*"
$(Q)$(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
endif
ifdef LTLIBRARY
$(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
@echo " [LD] $*"
$(Q)$(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS)
%.lo: %.c
@echo " [CC] $@"
$(Q)$(LTCOMPILE) -c $<
else
%.o: %.c
@echo " [CC] $@"
$(Q)$(CC) $(CFLAGS) -c $<
endif
ifdef POTHEAD
%.pot: $(XGETTEXTFILES)
$(XGETTEXT) --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
# Generate temp .po files, to check whether translations need updating.
# Not by default, due to gettext output differences between versions.
%.po: $(POTHEAD)
# $(MSGMERGE) -o $@.tmpo $@ $(POTHEAD)
# if ! diff $@.tmpo $@ >/dev/null; then echo "$@ dated, see $@.tmpo"; fi
%.mo: %.po
$(MSGFMT) -o $@ $<
endif
source :
$(SOURCE_MAKERULE)
endif # _BUILDRULES_INCLUDED_
$(_FORCE):
.PHONY : depend
DEPENDSCRIPT := $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
$(SED) -e 's,`pwd`,$(TOPDIR),g' \
-e 's, */[^ ]*,,g' \
-e '/^[^ ]*: *$$/d' \
-e '/^ *$$/d'
ifdef LTLIBRARY
DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
endif
depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS))
$(DEPENDSCRIPT) > .dep
test -s .dep || rm -f .dep
%-depend:
$(MAKE) -C $* depend
# Include dep, but only if it exists
ifeq ($(shell test -f .dep && echo .dep), .dep)
include .dep
else
ifdef LTLIBRARY
$(LTOBJECTS): $(HFILES)
else
$(OBJECTS): $(HFILES)
endif
endif