bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 02/17] Enable silent builds by default if available


From: Guillem Jover
Subject: [PATCH 02/17] Enable silent builds by default if available
Date: Thu, 25 Aug 2011 15:22:25 +0200

* configure.ac (AM_SILENT_RULES): Add silent rules support if available,
and enable 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 +++++++++++++++++++++++++-----
 Makefrag.am      |    7 ++++---
 Makerules.am     |   10 +++++-----
 Makerules.mig.am |   22 +++++++++++-----------
 configure.ac     |    3 +++
 5 files changed, 48 insertions(+), 24 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 04885dd..67aec74 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
@@ -68,6 +68,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.
 #
 
@@ -140,15 +160,15 @@ clib_routines := memcmp memcpy memmove memset bcopy bzero 
\
                 __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 50ec6b4..9afa81b 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([yes])],
+                            [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
 
 #
 # Deduce the architecture we're building for.
-- 
1.7.5.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]