[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] INSTALL: convert to '' quoting, drop blank line at end
From: |
Jim Meyering |
Subject: |
Re: [PATCH] INSTALL: convert to '' quoting, drop blank line at end |
Date: |
Mon, 23 Jan 2012 19:22:28 +0100 |
Eric Blake wrote:
> This is allowed by recent GNU Coding Standards changes, and
> mirrors recent gnulib changes:
> https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00267.html
> https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00298.html
>
> I've confirmed that after these changes, the INSTALL generated and
> installed by autoconf matches the INSTALL.ISO in gnulib.
>
> * Makefile.am ($(srcdir)/INSTALL): Match gnulib INSTALL.ISO.
>
> Signed-off-by: Eric Blake <address@hidden>
> ---
>
> I'll push this in another day or so if I don't get any reviews.
>
> Makefile.am | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 7608874..79a8e48 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -39,13 +39,19 @@ AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split
>
> if MAKE_CASE_SENSITIVE
> pkgdata_DATA = $(srcdir)/INSTALL
> -
> MAINTAINERCLEANFILES = $(srcdir)/INSTALL
> +
> +# Don't leave blank line at end of file.
> +OMIT_TRAILING_EMPTY_LINES = '/^$$/H; /^$$/d; x; s/\n//p; s/\n*//; x'
> +# Prefer 'plain quotes' over `makeinfo quotes'.
> +CONVERT_QUOTES = "s/\`\([^']*\)'/'\1'/g"
> +
> $(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi
> echo @firstparagraphindent insert \
> | cat - $(top_srcdir)/doc/install.texi > tmp.texi
> $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
> - --plaintext -o $@ tmp.texi
> + --plaintext tmp.texi \
> + | sed -e $(CONVERT_QUOTES) -e $(OMIT_TRAILING_EMPTY_LINES) > $@
Thanks. That looks fine except for the fact that the new rule redirects
directly to the target, address@hidden
Please adjust it to use this idiom instead:
... > address@hidden && mv address@hidden $@
so that if/when the sed somehow fails we're not left with a corrupt
file whose last-modification date suggests it is up-to-date.