]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
INSTALL: convert to '' quoting, drop blank line at end
authorEric Blake <eblake@redhat.com>
Mon, 23 Jan 2012 17:48:03 +0000 (10:48 -0700)
committerEric Blake <eblake@redhat.com>
Mon, 23 Jan 2012 18:30:35 +0000 (11:30 -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 <eblake@redhat.com>
Makefile.am

index 7608874ab88bc0d7fe8128678b95f89466f21e67..a1952419e168900b8bafaf8357e7352a24afd73a 100644 (file)
@@ -39,13 +39,20 @@ 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                       \
+       echo @firstparagraphindent insert                               \
          | cat - $(top_srcdir)/doc/install.texi > tmp.texi
-       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)        \
-         --plaintext -o $@ tmp.texi
+       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)                \
+            --plaintext tmp.texi                                       \
+         | sed -e $(CONVERT_QUOTES) -e $(OMIT_TRAILING_EMPTY_LINES)    \
+            > $@-t && mv $@-t $@
        rm -f tmp.texi
 endif