diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-05-21 15:15:09 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-05-21 15:15:09 +0300 |
commit | 9b285abfa3c46d7b751ce11bac5348a9e961c407 (patch) | |
tree | 97fd63d25449482ff575f818a0e21c2a424bf23c | |
parent | e05c23ef2cd57c83da5de591dbc3d7b38cb13b85 (diff) | |
download | pies-9b285abfa3c46d7b751ce11bac5348a9e961c407.tar.gz pies-9b285abfa3c46d7b751ce11bac5348a9e961c407.tar.bz2 |
More work on `silent rules' mode
* bootstrap (silent_rules_prog): Preserve leading
whitespace verbatim, when inserting the AM_V variables.
Suggested by Ralf Wildenhues.
Optionally insert the definitions of
AM_DEFAULT_VERBOSITY, AM_V_GEN and AM_V_at: useful for
po/Makefile.in.in
(silentize): New function.
(slurp): Call silentize
Call silentize on po/Makefile.in.in.
* doc/Makefile.am, etc/Makefile.am,
pies/Makefile.am, pmult/Makefile.am,
tests/Makefile.am, tests/etc/Makefile.am: Add silent rule markers.
-rwxr-xr-x | bootstrap | 51 | ||||
-rw-r--r-- | doc/Makefile.am | 8 | ||||
-rw-r--r-- | pies/Makefile.am | 4 |
3 files changed, 39 insertions, 24 deletions
@@ -432,5 +432,16 @@ silent_rules_prog=' # cont = 1 - this line is a continuation of the previous one - +# defn = 1 - insert AM_V_GEN/AM_V_at definitions after the initail comment # Print comment lines /^[ \t]*#/ { print; next } +# Insert AM_V_ definitions, if required. +state == 0 && defn == 1 { + print "AM_DEFAULT_VERBOSITY=0" # FIXME + print "AM_V_GEN = $(am__v_GEN_$(V))" + print "am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))" + print "am__v_GEN_0 = @echo \" GEN \" $@;" + print "AM_V_at = $(am__v_at_$(V))" + print "am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))" + print "am__v_at_0 = @" + defn = 0 +} # Start of a rule @@ -441,8 +452,5 @@ state == 1 && /^\t/ { # is necessary to handle @VAR@ substitutions. - if (match($1, /^@/) && !match($1, /@$/)) - print - else { - sub(/^\t[\t ]*/,"") - print "\t$(AM_V_GEN)" $0 - } + if (!(match($1, /^@/) && !match($1, /.@$/))) + sub(/^\t[\t ]*/, "&$(AM_V_GEN)") + print cont = match($0, /\\$/) @@ -454,7 +462,5 @@ state == 1 && /^\t/ { state == 2 && /^\t/ && NF > 0 { - if (!cont) { - sub(/^\t[\t ]*/,"") - print "\t$(AM_V_at)" $0 - } else - print + if (!cont) + sub(/^\t[\t ]*/, "&$(AM_V_at)") + print cont = match($0, /\\$/) @@ -463,3 +469,4 @@ state == 2 && /^\t/ && NF > 0 { # Everything else is output verbatim -{ print }' +{ print } +' @@ -470,2 +477,13 @@ grep 'AM_SILENT_RULES' configure.ac > /dev/null || +silentize() { + if test "$silent_rules" = yes; then + case $1 in + *.am) defn=0;; + *.in) defn=1;; + esac + awk -v defn=$defn "$silent_rules_prog" $1 > ${1}-t && + mv ${1}-t $1 + fi +} + slurp() { @@ -491,6 +509,3 @@ slurp() { } - if test "$silent_rules" = yes; then - awk "$silent_rules_prog" $dir/$gnulib_mk > $dir/${gnulib_mk}-t && - mv $dir/${gnulib_mk}-t $dir/${gnulib_mk} - fi + silentize $dir/$gnulib_mk elif { test "${2+set}" = set && test -r $2/$dir/$file; } || @@ -653,3 +668,3 @@ if test $with_gettext = yes; then ' po/Makevars.template >po/Makevars - + silentize po/Makefile.in.in if test -d runtime-po; then diff --git a/doc/Makefile.am b/doc/Makefile.am index c10bb0b..1a7396c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -37,3 +37,3 @@ EXTRA_DIST = \ clean-local: - rm -rf manual + @rm -rf manual @@ -143,3 +143,3 @@ all-check-docs: check-format check-options check-pragmas check-builtins check-mf check-docs: - $(MAKE) -k all-check-docs + @$(MAKE) -k all-check-docs @@ -148,6 +148,6 @@ check-docs: master-menu: - emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS) + $(AM_V_GEN)emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS) untabify: - emacs -batch -l untabify.el $(info_TEXINFOS) $(mailfromd_TEXINFOS) + @emacs -batch -l untabify.el $(info_TEXINFOS) $(mailfromd_TEXINFOS) diff --git a/pies/Makefile.am b/pies/Makefile.am index 1902804..7aaf759 100644 --- a/pies/Makefile.am +++ b/pies/Makefile.am @@ -1,3 +1,3 @@ # This file is part of mailfrom filter. -# Copyright (C) 2008 Sergey Poznyakoff +# Copyright (C) 2008, 2009 Sergey Poznyakoff # @@ -36,3 +36,3 @@ DISTCLEANFILES = pies.rc .rcin.rc: - sed 's|SBINDIR|$(sbindir)|g' $< > $@ + $(AM_V_GEN)sed 's|SBINDIR|$(sbindir)|g' $< > $@ |