From a877419704dc3adc5b136fa6fb9a8d7a6d0d4df9 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 30 Aug 2011 02:22:24 +0200 Subject: Add silent rules support if available and disable it by default * configure.ac (AM_SILENT_RULES): Add silent rules support if available, and disable it by default. * Makefile.am (AWK_V, AWK_V_, AWK_V_0): New variables. (NM_V, NM_V_, NM_V_0): Likewise. (GZIP_V, GZIP_V_, GZIP_V_0): Likewise. (MIGCOM_V, MIGCOM_V_, MIGCOM_V_0): Likewise. (gnumach-undef): Use NM_V in front of NM. (gnumach-undef-bad): Use AM_V_GEN in front of sed. (clib-routines.o): Use AM_V_at in fron of undefined symbols check. Use AM_V_CCLD in front of CCLD. * Makefrag.am (gnumach.msgids): Use AM_V_GEN in front of cat. * Makerules.am (%.symc): Use AWK_V in front of AWK. (%.symc.o): Use AM_V_CC in front of COMPILE. (%.h): Use AM_V_GEN in front of sed. (%.gz): Use GZIP_V in front of GZIP. * Makerules.mig.am (%.user.defs.c): Use AM_V_GEN in front of command. (%.server.defs.c): Likewise. (%.user.h %.user.c %.user.msgids): Use MIGCOM_V in front of MIGCOM. (%.server.h %.server.c %.server.msgids): Likewise. --- Makefile.am | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index ccca7f31..56db9e9b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ # Makefile for GNU Mach. -# Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -71,6 +71,26 @@ AM_CFLAGS += \ endif # +# Silent build support. +# + +AWK_V = $(AWK_V_$(V)) +AWK_V_ = $(AWK_V_$(AM_DEFAULT_VERBOSITY)) +AWK_V_0 = @echo " AWK $@"; + +GZIP_V = $(GZIP_V_$(V)) +GZIP_V_ = $(GZIP_V_$(AM_DEFAULT_VERBOSITY)) +GZIP_V_0 = @echo " GZIP $@"; + +NM_V = $(NM_V_$(V)) +NM_V_ = $(NM_V_$(AM_DEFAULT_VERBOSITY)) +NM_V_0 = @echo " NM $@"; + +MIGCOM_V = $(MIGCOM_V_$(V)) +MIGCOM_V_ = $(MIGCOM_V_$(AM_DEFAULT_VERBOSITY)) +MIGCOM_V_0 = @echo " MIG $@"; + +# # MIG Setup. # @@ -143,15 +163,15 @@ clib_routines := memcmp memcpy memmove memset \ __rel_iplt_start __rel_iplt_end \ _START _start etext _edata end _end # actually ld magic, not libc. gnumach-undef: gnumach.$(OBJEXT) - $(NM) -u $< | sed 's/ *U *//' | sort -u > $@ + $(NM_V) $(NM) -u $< | sed 's/ *U *//' | sort -u > $@ MOSTLYCLEANFILES += gnumach-undef gnumach-undef-bad: gnumach-undef Makefile - sed '$(foreach r,$(clib_routines),/^$r$$/d;)' $< > $@ + $(AM_V_GEN) sed '$(foreach r,$(clib_routines),/^$r$$/d;)' $< > $@ MOSTLYCLEANFILES += gnumach-undef-bad clib-routines.o: gnumach-undef gnumach-undef-bad - if test -s gnumach-undef-bad; \ + $(AM_V_at) if test -s gnumach-undef-bad; \ then cat gnumach-undef-bad; exit 2; else true; fi - $(CCLD) -nostdlib -nostartfiles -r -static \ + $(AM_V_CCLD) $(CCLD) -nostdlib -nostartfiles -r -static \ -o $@ `sed 's/^/-Wl,-u,/' < $<` -x c /dev/null -lc -lgcc gnumach_LINK = $(LD) $(LINKFLAGS) $(gnumach_LINKFLAGS) -o $@ -- cgit v1.2.3