diff options
author | Guillem Jover <guillem@hadrons.org> | 2011-08-30 02:22:24 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-31 22:06:39 +0200 |
commit | a877419704dc3adc5b136fa6fb9a8d7a6d0d4df9 (patch) | |
tree | fa71d25762a7363621d448a643a388a294f7a8ae | |
parent | a25d046db7a5f67b3aa553f988d2e7527e6a3d2b (diff) |
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.
-rw-r--r-- | Makefile.am | 30 | ||||
-rw-r--r-- | Makefrag.am | 7 | ||||
-rw-r--r-- | Makerules.am | 10 | ||||
-rw-r--r-- | Makerules.mig.am | 22 | ||||
-rw-r--r-- | configure.ac | 3 |
5 files changed, 48 insertions, 24 deletions
diff --git a/Makefile.am b/Makefile.am index ccca7f3..56db9e9 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 $@ diff --git a/Makefrag.am b/Makefrag.am index bd683ac..5e26aa7 100644 --- a/Makefrag.am +++ b/Makefrag.am @@ -1,6 +1,7 @@ # Main Makefile fragment for GNU Mach. -# Copyright (C) 1997, 1999, 2004, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 2004, 2006, 2007, 2009 Free Software +# Foundation, Inc. # Permission to use, copy, modify and distribute this software and its # documentation is hereby granted, provided that both the copyright @@ -502,8 +503,8 @@ nodist_libkernel_a_SOURCES += \ MOSTLYCLEANFILES += \ gnumach.msgids gnumach.msgids: $(filter %.msgids,$(nodist_libkernel_a_SOURCES)) - cat $^ > $@.new - mv $@.new $@ + $(AM_V_at) cat $^ > $@.new + $(AM_V_GEN) mv $@.new $@ # `exec_' prefix, so that we don't try to build that file during when running # `make install-data', as it may fail there, but isn't needed there either. exec_msgidsdir = $(datadir)/msgids diff --git a/Makerules.am b/Makerules.am index 37d383a..b1f17d1 100644 --- a/Makerules.am +++ b/Makerules.am @@ -1,6 +1,6 @@ # Makerules: how to do some things. -# Copyright (C) 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. # Permission to use, copy, modify and distribute this software and its # documentation is hereby granted, provided that both the copyright @@ -20,11 +20,11 @@ EXTRA_DIST += \ gensym.awk %.symc: %.sym gensym.awk - $(AWK) -f $(word 2,$^) $< > $@ + $(AWK_V) $(AWK) -f $(word 2,$^) $< > $@ %.symc.o: %.symc - $(COMPILE) -S -x c -o $@ $< + $(AM_V_CC) $(COMPILE) -S -x c -o $@ $< %.h: %.symc.o - sed < $< > $@ \ + $(AM_V_GEN) sed < $< > $@ \ -e 's/^[^*].*$$//' \ -e 's/^[*]/#define/' \ -e 's/mAgIc[^-0-9]*//' @@ -37,7 +37,7 @@ include Makerules.mig.am # %.gz: % - $(GZIP) -9 < $< > $@ + $(GZIP_V) $(GZIP) -9 < $< > $@ # # strip files. diff --git a/Makerules.mig.am b/Makerules.mig.am index b3f76da..3060984 100644 --- a/Makerules.mig.am +++ b/Makerules.mig.am @@ -1,6 +1,6 @@ # Makerules.mig: how to do some MIG-related things. -# Copyright (C) 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2006, 2007, 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 @@ -72,20 +72,20 @@ lib_dep_tr_for_defs_a_CPPFLAGS = $(AM_CPPFLAGS) \ -E %.server.defs.c: %.srv - rm -f $@ - cp -p $< $@ + $(AM_V_at) rm -f $@ + $(AM_V_GEN) cp -p $< $@ %.user.defs.c: %.cli - rm -f $@ - cp -p $< $@ + $(AM_V_at) rm -f $@ + $(AM_V_GEN) cp -p $< $@ %.server.h %.server.c %.server.msgids: lib_dep_tr_for_defs_a-%.server.defs.$(OBJEXT) - $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \ - -sheader $*.server.h -server $*.server.c \ - -list $*.server.msgids \ + $(MIGCOM_V) $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \ + -sheader $*.server.h -server $*.server.c \ + -list $*.server.msgids \ < $< %.user.h %.user.c %.user.msgids: lib_dep_tr_for_defs_a-%.user.defs.$(OBJEXT) - $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) \ - -user $*.user.c -header $*.user.h \ - -list $*.user.msgids \ + $(MIGCOM_V) $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) \ + -user $*.user.c -header $*.user.h \ + -list $*.user.msgids \ < $< # This is how it should be done, but this is not integrated into GNU Automake diff --git a/configure.ac b/configure.ac index 91bdea3..3a7d3be 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,9 @@ dnl Do not clutter the main build directory. dnl We require GNU make. [-Wall -Wno-portability] ) + +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])], + [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) # # Deduce the architecture we're building for. |