Remove trailing blank lines when generating INSTALL
Joseph S. Myers
joseph@codesourcery.com
Mon Jul 1 22:31:00 GMT 2013
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
More information about the Libc-alpha
mailing list