This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Remove trailing blank lines when generating INSTALL
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 1 Jul 2013 22:31:05 +0000
- Subject: Re: Remove trailing blank lines when generating INSTALL
- References: <Pine dot LNX dot 4 dot 64 dot 1306282214071 dot 15167 at digraph dot polyomino dot org dot uk> <20130628222721 dot 98FFA2C09C at topped-with-meat dot com>
On Fri, 28 Jun 2013, Roland McGrath wrote:
> awk 'NF == 0 { ++n; next } NF != 0 { while (n-- > 0) print ""; n = 0; print }'
Here is a patch using that command for the blank line removal.
2013-07-01 Joseph Myers <joseph@codesourcery.com>
Roland McGrath <roland@hack.frob.com>
* Makefile (INSTALL): Remove trailing blank lines from output of
makeinfo.
diff --git a/Makefile b/Makefile
index 7d8eccf..9f0f26c 100644
--- a/Makefile
+++ b/Makefile
@@ -403,7 +403,12 @@ 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 $@
+ -I$(common-objpfx)manual $< -o $@-tmp
+ awk 'NF == 0 { ++n; next } \
+ NF != 0 { while (n-- > 0) print ""; n = 0; print }' \
+ < $@-tmp > $@-tmp2
+ mv -f $@-tmp2 $@
+ rm -f $@-tmp
-chmod a-w $@
$(common-objpfx)manual/%: FORCE
$(MAKE) $(PARALLELMFLAGS) -C manual $@
--
Joseph S. Myers
joseph@codesourcery.com