[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Enable silent builds by default if available
From: |
Guillem Jover |
Subject: |
[PATCH] Enable silent builds by default if available |
Date: |
Sat, 5 Dec 2009 23:21:10 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
* 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 | 5 ++++-
5 files changed, 49 insertions(+), 25 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 25fd403..129590c 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 $@";
+
+NM_V = $(NM_V_$(V))
+NM_V_ = $(NM_V_$(AM_DEFAULT_VERBOSITY))
+NM_V_0 = @echo " NM $@";
+
+GZIP_V = $(GZIP_V_$(V))
+GZIP_V_ = $(GZIP_V_$(AM_DEFAULT_VERBOSITY))
+GZIP_V_0 = @echo " GZIP $@";
+
+MIGCOM_V = $(MIGCOM_V_$(V))
+MIGCOM_V_ = $(MIGCOM_V_$(AM_DEFAULT_VERBOSITY))
+MIGCOM_V_0 = @echo " MIG $@";
+
+#
# MIG Setup.
#
@@ -139,15 +159,15 @@ clib_routines := memcmp memcpy memmove memset bcopy bzero
\
udivdi3 __udivdi3 \
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 05aaeb4..f7d5a43 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
@@ -489,8 +490,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 4e37590..1b87bef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl Configure script for GNU Mach.
-dnl Copyright (C) 1997, 1998, 1999, 2004, 2006, 2007, 2008 Free Software
+dnl Copyright (C) 1997, 1998, 1999, 2004, 2006, 2007, 2008, 2009 Free Software
dnl Foundation, Inc.
dnl Permission to use, copy, modify and distribute this software and its
@@ -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.6.5.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Enable silent builds by default if available,
Guillem Jover <=