Module Name: src Committed By: uwe Date: Thu Nov 28 00:06:39 UTC 2019
Modified Files: src/distrib/notes: Makefile.inc src/distrib/notes/common: macros Log Message: Use .open/.write instead of .tm to emit TOC. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/distrib/notes/Makefile.inc cvs rdiff -u -r1.48 -r1.49 src/distrib/notes/common/macros Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/notes/Makefile.inc diff -u src/distrib/notes/Makefile.inc:1.50 src/distrib/notes/Makefile.inc:1.51 --- src/distrib/notes/Makefile.inc:1.50 Wed Nov 27 23:19:13 2019 +++ src/distrib/notes/Makefile.inc Thu Nov 28 00:06:39 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.50 2019/11/27 23:19:13 uwe Exp $ +# $NetBSD: Makefile.inc,v 1.51 2019/11/28 00:06:39 uwe Exp $ # # Ross Harvey <r...@netbsd.org> @@ -107,32 +107,26 @@ ${TARG}.more: ${SRCS} ${TOC.more} ${DIST # They are generated twice to take into account the # space taken by the TOC itself. -# TOC is emitted with .tm on groff's stderr, divert those lines to stdout. -# NB: /dev/stderr is nawk's internal designation, not /dev/stderr file. -# TODO: use .open/.write instead. -TOCPROC = 2>&1 >/dev/null | \ - ${TOOL_AWK} '{ if ($$1 == ".Ti") print; else print > "/dev/stderr"; }' - ${TARG}.PostScript.toc: ${SRCS} - ${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp + ${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} > /dev/null mv -f $@.tmp $@ - ${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp + ${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} > /dev/null mv -f $@.tmp $@ ${TARG}.ASCII.toc: ${SRCS} - ${TOOL_GROFF} -dTOC=1 ${ARGS_TXT} -mdoc ${MAIN} ${TOCPROC} > $@.tmp + ${TOOL_GROFF} -dTOC=1 ${ARGS_TXT} -mdoc ${MAIN} > /dev/null mv -f $@.tmp $@ - ${TOOL_GROFF} -dTOC=1 ${ARGS_TXT} -mdoc ${MAIN} ${TOCPROC} > $@.tmp + ${TOOL_GROFF} -dTOC=1 ${ARGS_TXT} -mdoc ${MAIN} > /dev/null mv -f $@.tmp $@ ${TARG}.HTML.toc: ${SRCS} - ${TOOL_GROFF} -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} ${TOCPROC} > $@.tmp + ${TOOL_GROFF} -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} > /dev/null mv -f $@.tmp $@ ${TARG}.more.toc: ${SRCS} - ${TOOL_GROFF} -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} ${TOCPROC} > $@.tmp + ${TOOL_GROFF} -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} > /dev/null mv -f $@.tmp $@ - ${TOOL_GROFF} -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} ${TOCPROC} > $@.tmp + ${TOOL_GROFF} -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} > /dev/null mv -f $@.tmp $@ Index: src/distrib/notes/common/macros diff -u src/distrib/notes/common/macros:1.48 src/distrib/notes/common/macros:1.49 --- src/distrib/notes/common/macros:1.48 Wed Nov 27 23:57:41 2019 +++ src/distrib/notes/common/macros Thu Nov 28 00:06:39 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: macros,v 1.48 2019/11/27 23:57:41 uwe Exp $ +.\" $NetBSD: macros,v 1.49 2019/11/28 00:06:39 uwe Exp $ .\" .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -311,10 +311,12 @@ .\" .Ti depth page "item" (internal) output an entry .ds toc-file INSTALL.\*[format].toc .if dTOC \{\ +.tm ...writing \*[toc-file].tmp +.open toc-tmp \*[toc-file].tmp .de mktoc .nr mktoc-level \\$1 .shift -.tm .Ti \\n[toc-level] \\n% "\\$*" +.write toc-tmp .Ti \\n[toc-level] \\n% "\\$*" .. .rn Ss Ss-toc .de Ss