about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Makefile9
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 18fd09a551..0880ef74ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-08-20  Joseph Myers  <joseph@codesourcery.com>
+	    Roland McGrath  <roland@hack.frob.com>
+
+	* Makefile (INSTALL): Remove trailing blank lines from output of
+	makeinfo.
+
 2013-08-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
 	* sysdeps/unix/sysv/linux/s390/sys/procfs.h (struct elf_prstatus):
diff --git a/Makefile b/Makefile
index 7d8eccf2e5..119bb26c39 100644
--- a/Makefile
+++ b/Makefile
@@ -403,8 +403,13 @@ endif
 INSTALL: manual/install.texi manual/macros.texi \
 	 $(common-objpfx)manual/pkgvers.texi
 	makeinfo --no-validate --plaintext --no-number-sections \
-		 -I$(common-objpfx)manual $< -o $@
-	-chmod a-w $@
+		 -I$(common-objpfx)manual $< -o $@-tmp
+	$(AWK) 'NF == 0 { ++n; next } \
+		NF != 0 { while (n-- > 0) print ""; n = 0; print }' \
+	  < $@-tmp > $@-tmp2
+	rm -f $@-tmp
+	-chmod a-w $@-tmp2
+	mv -f $@-tmp2 $@
 $(common-objpfx)manual/%: FORCE
 	$(MAKE) $(PARALLELMFLAGS) -C manual $@
 FORCE: