autoconf-patches
[Top][All Lists]
Advanced

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

[PATCH] INSTALL: convert to '' quoting, drop blank line at end


From: Eric Blake
Subject: [PATCH] INSTALL: convert to '' quoting, drop blank line at end
Date: Mon, 23 Jan 2012 10:54:07 -0700

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) > $@
        rm -f tmp.texi
 endif

-- 
1.7.7.5




reply via email to

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