From owner-freebsd-doc Tue Apr 10 23:56:23 2001 Delivered-To: freebsd-doc@freebsd.org Received: from nothing-going-on.demon.co.uk (pc-62-31-42-141-hy.blueyonder.co.uk [62.31.42.141]) by hub.freebsd.org (Postfix) with ESMTP id 7327737B422; Tue, 10 Apr 2001 23:56:05 -0700 (PDT) (envelope-from nik@nothing-going-on.demon.co.uk) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.11.3/8.11.3) id f3B6tlL06518; Wed, 11 Apr 2001 07:55:47 +0100 (BST) (envelope-from nik) Date: Wed, 11 Apr 2001 07:55:46 +0100 From: Nik Clayton To: Murray Stokely Cc: Nik Clayton , freebsd-doc@FreeBSD.ORG Subject: Re: Indexing the Handbook Message-ID: <20010411075546.A6461@canyon.nothing-going-on.org> References: <20010223144043.A46865@canyon.nothing-going-on.org> <20010404103259.C45781@canyon.nothing-going-on.org> <20010409015111.B6398@meow.osd.bsdi.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="H1spWtNR+x+ondvy" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010409015111.B6398@meow.osd.bsdi.com>; from murray@osd.bsdi.com on Mon, Apr 09, 2001 at 01:51:11AM -0700 Organization: FreeBSD Project Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --H1spWtNR+x+ondvy Content-Type: multipart/mixed; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 09, 2001 at 01:51:11AM -0700, Murray Stokely wrote: > On Wed, Apr 04, 2001 at 10:32:59AM +0100, Nik Clayton wrote: > > Looking through doc.docbook.mk, I think there's a bug with GEN_INDEX, > > and the html and html-split formats (I think there's a possibility for > > it to use the FORMATS=3Dhtml index.sgml when, in fact, > > FORMATS=3Dhtml-split. > >=20 > > I'll try and test that out and fix it if it is a problem. >=20 > This is how I fixed the problem on my local tree. I simply create > an index.sgml file with 'touch' to solve the chicken and egg problem > so that jade doesn't bomb out in the first pass, and then I add the -f > option to collateindex.pl to clobber this blank file. Did you have a > more elegant solution, or do you mind if I commit this? I think you're supposed to use the -N option to collateindex.pl to do this. Attached is what's currently in my tree. It pulls out the generation of the various .index files to separate targets, and uses a different =2Eindex file for html, html-split, and print formats. It's only been lightly tested, and the output for print indexes seems to be screwy on my test document -- I have no idea why. Also, I think the 'API' (for want of a better term) for this is wrong. At the moment, if GEN_INDEX is defined then it is assumed that the index will be written to index.sgml. I think this should be changed, so that if GEN_INDEX is defined but empty then 'index.sgml' is chosen, and that if GEN_INDEX is defined and non-empty then the index is written to the file named in GEN_INDEX. In this context, GEN_INDEX might not be the best filename to use. N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ FreeBSD Documentation Project http://www.freebsd.org/docproj/ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff Content-Transfer-Encoding: quoted-printable Index: mk/doc.docbook.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/doc/share/mk/doc.docbook.mk,v retrieving revision 1.31 diff -u -r1.31 doc.docbook.mk --- mk/doc.docbook.mk 2001/03/27 16:15:07 1.31 +++ mk/doc.docbook.mk 2001/04/10 15:17:10 @@ -126,46 +126,96 @@ =20 .for _curformat in ${FORMATS} _cf=3D${_curformat} + .if ${_cf} =3D=3D "html-split" _docs+=3D index.html HTML.manifest ln*.html CLEANFILES+=3D `[ -f HTML.manifest ] && xargs < HTML.manifest` HTML.manife= st ln*.html +.if defined(GEN_INDEX) +SRCS+=3D index.sgml html-split.index +CLEANFILES+=3D index.sgml html-split.index +.endif + + .elif ${_cf} =3D=3D "html-split.tar" _docs+=3D ${DOC}.html-split.tar CLEANFILES+=3D `[ -f HTML.manifest ] && xargs < HTML.manifest` HTML.manife= st ln*.html CLEANFILES+=3D ${DOC}.html-split.tar +.if defined(GEN_INDEX) +SRCS+=3D index.sgml html-split.index +CLEANFILES+=3D index.sgml html-split.index +.endif + .elif ${_cf} =3D=3D "html" _docs+=3D ${DOC}.html CLEANFILES+=3D ${DOC}.html +.if defined(GEN_INDEX) +SRCS+=3D index.sgml html.index +CLEANFILES+=3D index.sgml html.index +.endif + .elif ${_cf} =3D=3D "html.tar" _docs+=3D ${DOC}.html.tar CLEANFILES+=3D ${DOC}.html ${DOC}.html.tar +.if defined(GEN_INDEX) +SRCS+=3D index.sgml html.index +CLEANFILES+=3D index.sgml html.index +.endif + .elif ${_cf} =3D=3D "txt" _docs+=3D ${DOC}.txt CLEANFILES+=3D ${DOC}.html ${DOC}.txt ${DOC}.html-text +.if defined(GEN_INDEX) +SRCS+=3D index.sgml html.index +CLEANFILES+=3D index.sgml html.index +.endif + .elif ${_cf} =3D=3D "dvi" _docs+=3D ${DOC}.dvi CLEANFILES+=3D ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex +.if defined(GEN_INDEX) +SRCS+=3D index.sgml print.index +CLEANFILES+=3D index.sgml print.index +.endif + .elif ${_cf} =3D=3D "ps" _docs+=3D ${DOC}.ps CLEANFILES+=3D ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex-ps ${DOC}.ps +.if defined(GEN_INDEX) +SRCS+=3D index.sgml print.index +CLEANFILES+=3D index.sgml print.index +.endif + .elif ${_cf} =3D=3D "pdf" _docs+=3D ${DOC}.pdf CLEANFILES+=3D ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.out ${DOC}.tex-pdf = ${DOC}.pdf +.if defined(GEN_INDEX) +SRCS+=3D index.sgml print.index +CLEANFILES+=3D index.sgml print.index +.endif + .elif ${_cf} =3D=3D "rtf" _docs+=3D ${DOC}.rtf CLEANFILES+=3D ${DOC}.rtf +.if defined(GEN_INDEX) +SRCS+=3D index.sgml print.index +CLEANFILES+=3D index.sgml print.index +.endif + .elif ${_cf} =3D=3D "tar" _docs+=3D ${DOC}.tar CLEANFILES+=3D ${DOC}.tar + .elif ${_cf} =3D=3D "pdb" _docs+=3D ${DOC}.pdb ${.CURDIR:T}.pdb CLEANFILES+=3D ${DOC}.pdb ${.CURDIR:T}.pdb +.if defined(GEN_INDEX) +SRCS+=3D index.sgml html.index +CLEANFILES+=3D index.sgml html.index .endif -.endfor =20 -.if defined(GEN_INDEX) -CLEANFILES+=3DHTML.index .endif +.endfor + =20 # # Build a list of install-${format}.${compress_format} targets to be @@ -196,20 +246,12 @@ all: ${_docs} =20 index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} -.if defined(GEN_INDEX) - ${JADE} -V html-index -ioutput.html -ioutput.html.images ${JADEOPTS} -d $= {DSLHTML} -t sgml ${MASTERDOC} - perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -o in= dex.sgml HTML.index -.endif ${JADE} -V html-manifest -ioutput.html -ioutput.html.images ${JADEOPTS} -= d ${DSLHTML} -t sgml ${MASTERDOC} .if !defined(NO_TIDY) -tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest` .endif =20 ${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} -.if defined(GEN_INDEX) - ${JADE} -V html-index -ioutput.html -ioutput.html.images -V nochunks ${JA= DEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} - perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -o in= dex.sgml HTML.index -.endif ${JADE} -ioutput.html -ioutput.html.images -V nochunks ${JADEOPTS} -d ${D= SLHTML} -t sgml ${MASTERDOC} > ${.TARGET} || (rm -f ${.TARGET} && false) .if !defined(NO_TIDY) -tidy -i -m -f /dev/null ${TIDYFLAGS} ${.TARGET} @@ -288,6 +330,29 @@ =20 lint validate: ${NSGMLS} -s -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG}= -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g} ${MASTERDOC} + +# ------------------------------------------------------------------------ +# +# Index targets +# + +# +# Generate a different .index file based on the format name +# + +index.sgml: + perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -N -o= index.sgml + +html.index: + ${JADE} -V html-index -ioutput.html -ioutput.html.images -V nochunks ${JA= DEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > /dev/null + perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -o in= dex.sgml html.index + +html-split.index: + ${JADE} -V html-index -ioutput.html -ioutput.html.images ${JADEOPTS} -d $= {DSLHTML} -t sgml ${MASTERDOC} > /dev/null + perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -o in= dex.sgml html-split.index + +print.index: html.index + mv html.index print.index =20 # ------------------------------------------------------------------------ # Index: sgml/freebsd.dsl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/doc/share/sgml/freebsd.dsl,v retrieving revision 1.28 diff -u -r1.28 freebsd.dsl --- sgml/freebsd.dsl 2001/04/09 20:35:47 1.28 +++ sgml/freebsd.dsl 2001/04/10 15:08:16 @@ -68,6 +68,11 @@ (normalize "legalnotice") (normalize "isbn"))) =20 + (define html-index-filename + (if nochunks + "html.index" + "html-split.index")) + @@ -182,6 +187,9 @@ (if (string=3D? (gi nd) (normalize "book")) 3 1)) + + (define html-index-filename + "print.index") =20 (define %body-start-indent%=20 0pi) --y0ulUmNC+osPPQO6-- --H1spWtNR+x+ondvy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjrT//IACgkQk6gHZCw343UPvACfTER6AIBVObJZHiXVLJEbg9A+ YQMAnRbmmfMdOzc4jmyw3fXm2NRBhvET =Eyko -----END PGP SIGNATURE----- --H1spWtNR+x+ondvy-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message