[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add optional silent-rules support
From: |
Jim Meyering |
Subject: |
Re: [PATCH] Add optional silent-rules support |
Date: |
Thu, 21 May 2009 11:35:01 +0200 |
Sergey Poznyakoff wrote:
> How about the following patch, which adds support for `silent-rules'
> mode introduced in Automake 1.11:
>
> * build-aux/bootstrap (slurp): Add silent rule support to $gnulib_mk,
> if required by the configure.ac.
Hi Sergey,
Nice.
I did something similar using perl, but hadn't polished it enough
to publish, but now is my excuse. Might be interesting, if only
to compare the generated results.
>From 7d8434752c1b5c261f119ee55272a0bd6a9c4686 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 25 Apr 2009 16:35:34 +0200
Subject: [PATCH] build: make gnulib-tool-generated lib/gnulib.mk use
$(AM_V_GEN) etc.
* bootstrap: Modify the just-generated lib/gnulib.mk to use
automake's $(AM_V_GEN) and $(AM_V_at).
Signed-off-by: Jim Meyering <address@hidden>
---
bootstrap | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/bootstrap b/bootstrap
index 5e7fe9a..88bdce4 100755
--- a/bootstrap
+++ b/bootstrap
@@ -762,4 +762,24 @@ m=gnulib-tests/gnulib.mk
sed 's,\.\./\.\.,..,g' $m > $m-t
mv -f $m-t $m
+# Annotate the gnulib-tool-generated lib/gnulib.mk to use $(AM_V_*).
+f=lib/gnulib.mk
+if test -f $f; then
+ repl='\t\$(AM_V_GEN)$1\n\t\$(AM_V_at){'
+ perl -p \
+ -e 's/^\t(mv address@hidden address@hidden|if test -f \$\@ &&
cmp)/\t\$(AM_V_at)$1/;' \
+ -e 's/^\t(\$\(GPERF\)address@hidden)$/\t\$(AM_V_at)$1/;' \
+ -e 's/^\t((?:cp|chmod)address@hidden)$/\t\$(AM_V_at)$1/;' \
+ -e 's/^\t(\$\(MKDIR_P\).*)$/\t\$(AM_V_at)$1/;' \
+ -e 's/^\t(address@hidden@.*)$/\t\$(AM_V_at)$1/;' \
+ -e 's/^\t(mv -f address@hidden \$\@)$/\t\$(AM_V_at)$1/;' \
+ $f \
+ | perl -p -0777 \
+ -e 's/^\t(rm -f address@hidden(?: \$\@)?)\n\t{/'"$repl"'/gm' \
+ | perl -p \
+ -e 's/^\t(\{ .*\\)$/\t\$(AM_V_at)$1/;' \
+ -e 's/^\t(rm -f address@hidden \$\@)$/\t\$(AM_V_GEN)$1/' \
+ > $f-t && mv $f-t $f
+fi
+
echo "$0: done. Now you can run './configure'."
--
1.6.3.1.149.gbc70c
Re: [PATCH] Add optional silent-rules support,
Jim Meyering <=
Re: [PATCH] Add optional silent-rules support, Eric Blake, 2009/05/21