Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/distrib/notes Pull up revisions 1.15-1.21 (requested by...



details:   https://anonhg.NetBSD.org/src/rev/5400f2b5dcc2
branches:  netbsd-1-5
changeset: 492860:5400f2b5dcc2
user:      he <he%NetBSD.org@localhost>
date:      Sat Feb 23 21:02:37 2002 +0000

description:
Pull up revisions 1.15-1.21 (requested by he):
  Add Table of Contents to the install notes.

diffstat:

 distrib/notes/Makefile.inc |  69 +++++++++++++++++++++++++++++++++++----------
 1 files changed, 53 insertions(+), 16 deletions(-)

diffs (122 lines):

diff -r 70b7ceb69e56 -r 5400f2b5dcc2 distrib/notes/Makefile.inc
--- a/distrib/notes/Makefile.inc        Sat Feb 23 21:02:22 2002 +0000
+++ b/distrib/notes/Makefile.inc        Sat Feb 23 21:02:37 2002 +0000
@@ -1,9 +1,12 @@
-#      $NetBSD: Makefile.inc,v 1.11.4.2 2000/11/01 03:44:33 tv Exp $
+#      $NetBSD: Makefile.inc,v 1.11.4.3 2002/02/23 21:02:37 he Exp $
 #
 
 # Ross Harvey <ross%netbsd.org@localhost>
 
-.include <bsd.obj.mk>  # So we get /etc/mk.conf vars.
+.include <bsd.own.mk>  # So we get /etc/mk.conf vars.
+
+# Whether or not to regenerate tables of contents
+MKTOCS?=yes
 
 M?=    ${.CURDIR:T}
 V!=    /bin/sh ${.CURDIR}/../../../sys/conf/osrelease.sh
@@ -12,13 +15,19 @@
 MAIN=  ${.CURDIR}/../common/main ${.CURDIR}/../common/macros ${EXTRA}
 TARG=  INSTALL
 TARGS= ${TARG}.ps ${TARG}.txt ${TARG}.html ${TARG}.more
+TOCS=  ${TARG}.PostScript.toc ${TARG}.ASCII.toc ${TARG}.HTML.toc \
+       ${TARG}.more.toc
 SRCS=  ${MAIN} whatis contents hardware xfer prep install\
        upgrade donations legal.common legal postinstall ../Makefile.inc\
        ${MERGED_SRCS}
 ICMD=  ${INSTALL} ${RENAME} ${PRESERVE} ${COPY}        \
        -o root -g wheel -m ${NONBINMODE} 
 
+.if defined(DESTDIR)
+PRESET=        ${GFLAGS} -dM=${M} -dV=${V} -d.CURDIR=${.CURDIR} -r${M}=1 -M${DESTDIR}/usr/share/tmac
+.else
 PRESET=        ${GFLAGS} -dM=${M} -dV=${V} -d.CURDIR=${.CURDIR} -r${M}=1
+.endif
 
 POST_PLAIN= -P-b -P-u -P-o
 
@@ -34,27 +43,56 @@
 #      .Ss "Install notes for NetBSD/\*[MACHINE]"
 #
 
-CLEANFILES+=${TARGS}
+all: ${TARGS}
 
-.for i in ps txt html more
-all: ${TARG}.$i
-.endfor
+.if ${MKTOCS} != "no"
+  TOCDEPS = ${TOCS}
+.else
+  TOCDEPS =
+.endif
 
-${TARG}.ps: ${SRCS}
+${TARG}.ps: ${SRCS} ${TOCDEPS}
        groff ${ARGS_PS}   -mdoc      ${MAIN} > $@
 
 ${TARG}.pdf: ${TARG}.ps
        ps2pdf ${TARG}.ps $@
 
-${TARG}.txt: ${SRCS}
+${TARG}.txt: ${SRCS} ${TOCDEPS}
        groff ${ARGS_TXT}  -mdoc      ${MAIN} > $@
 
-${TARG}.html: ${SRCS}
+${TARG}.html: ${SRCS} ${TOCDEPS}
        groff ${ARGS_HTML} -mdoc2html ${MAIN} > $@
 
-${TARG}.more: ${SRCS}
+${TARG}.more: ${SRCS} ${TOCDEPS}
        groff ${ARGS_MORE} -mdoc      ${MAIN} > $@
 
+TOCPROC=          2>&1 >/dev/null |\
+           sed -n '/^\.Ti/{s/ \([A-Za-z]\)/ "\1/; s/ *$$/"/; p; }'
+
+${TARG}.PostScript.toc: ${SRCS}
+       groff -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
+       mv -f $@.tmp $@
+       groff -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
+       mv -f $@.tmp $@
+
+${TARG}.ASCII.toc: ${SRCS}
+       groff -dTOC=1 ${ARGS_TXT} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
+       mv -f $@.tmp $@
+       groff -dTOC=1 ${ARGS_TXT} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
+       mv -f $@.tmp $@
+
+${TARG}.HTML.toc: ${SRCS}
+       groff -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
+       mv -f $@.tmp $@
+       groff -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
+       mv -f $@.tmp $@
+
+${TARG}.more.toc: ${SRCS}
+       groff -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
+       mv -f $@.tmp $@
+       groff -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
+       mv -f $@.tmp $@
+
 echosrcs! ${SRCS}
        @echo ${.ALLSRC}
 
@@ -67,13 +105,12 @@
        @false
 .else
 release:
-.for i in ${TARGS}
-       ${ICMD} ${i} ${RELEASEDIR}/.
-.endfor
+       ${ICMD} ${TARGS} ${RELEASEDIR}/.
 .endif
 
 .PATH: ${.CURDIR}/../common
 
-# make the "afterdepend" rule happy
-.depend:
-       @touch $@
+cleannotes:
+       rm -f [Ee]rrs mklog core *.core ${TARGS} ${TOCS}
+
+clean cleandir distclean: cleannotes



Home | Main Index | Thread Index | Old Index