View | Details | Raw Unified | Return to bug 90255
Collapse All | Expand All

(-)doc.docbook.mk (-17 / +29 lines)
Lines 427-446 Link Here
427
.endif
427
.endif
428
428
429
#
429
#
430
# Index generation
430
# Index generation
431
#
431
#
432
CLEANFILES+= 		${INDEX_SGML}
433
432
434
.if defined(GEN_INDEX) && defined(HAS_INDEX)
433
.if defined(GEN_INDEX) && defined(HAS_INDEX)
435
JADEFLAGS+=		-i chap.index
434
JADEFLAGS+=		-i chap.index
436
HTML_SPLIT_INDEX?=	html-split.index
435
HTML_SPLIT_INDEX?=	html-split.index
437
HTML_INDEX?=		html.index
436
HTML_INDEX?=		html.index
438
PRINT_INDEX?=		print.index
437
PRINT_INDEX?=		print.index
439
INDEX_SGML?=		index.sgml
438
INDEX_SGML?=		index.sgml
440
439
441
CLEANFILES+= 		${HTML_SPLIT_INDEX} ${HTML_INDEX} ${PRINT_INDEX}
440
CLEANFILES+= 		${INDEX_SGML} ${HTML_SPLIT_INDEX} ${HTML_INDEX} ${PRINT_INDEX}
441
442
INIT_INDEX_SGML_CMD=	${PERL} ${COLLATEINDEX} -i doc-index -N -o ${INDEX_SGML}
443
GEN_INDEX_SGML_CMD=	${PERL} ${COLLATEINDEX} -i doc-index -g -o ${INDEX_SGML} ${.ALLSRC:M*.index}
444
.else
445
GEN_INDEX_SGML_CMD=	@${ECHO} "No index to generate."
442
.endif
446
.endif
443
447
444
.MAIN: all
448
.MAIN: all
445
449
446
all: ${_docs}
450
all: ${_docs}
Lines 460-475 Link Here
460
464
461
# HTML-SPLIT -------------------------------------------------------------
465
# HTML-SPLIT -------------------------------------------------------------
462
466
463
.if ${STYLESHEET_TYPE} == "dsssl"
467
.if ${STYLESHEET_TYPE} == "dsssl"
464
index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
468
index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
465
			  ${LOCAL_IMAGES_TXT} ${INDEX_SGML} ${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET}
469
			  ${LOCAL_IMAGES_TXT} ${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET}
470
	${GEN_INDEX_SGML_CMD}
466
	${JADE_CMD} -V html-manifest ${HTMLOPTS} -ioutput.html.images \
471
	${JADE_CMD} -V html-manifest ${HTMLOPTS} -ioutput.html.images \
467
		${JADEOPTS} -t sgml ${MASTERDOC}
472
		${JADEOPTS} -t sgml ${MASTERDOC}
468
.elif ${STYLESHEET_TYPE} == "xsl"
473
.elif ${STYLESHEET_TYPE} == "xsl"
469
index.html: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
474
index.html: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
470
	${INDEX_SGML} ${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET}
475
	${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET}
476
	${GEN_INDEX_SGML_CMD}
471
	${XSLTPROC} ${XSLTPROCOPTS} --param freebsd.output.html.images "'1'" ${XSLHTMLCHUNK} \
477
	${XSLTPROC} ${XSLTPROCOPTS} --param freebsd.output.html.images "'1'" ${XSLHTMLCHUNK} \
472
		${DOC}.xml
478
		${DOC}.xml
473
.endif
479
.endif
474
.if !defined(NO_TIDY)
480
.if !defined(NO_TIDY)
475
	-${TIDY} ${TIDYOPTS} $$(${XARGS} < HTML.manifest)
481
	-${TIDY} ${TIDYOPTS} $$(${XARGS} < HTML.manifest)
Lines 477-493 Link Here
477
483
478
# HTML -------------------------------------------------------------------
484
# HTML -------------------------------------------------------------------
479
485
480
.if ${STYLESHEET_TYPE} == "dsssl"
486
.if ${STYLESHEET_TYPE} == "dsssl"
481
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
487
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
482
	     ${LOCAL_IMAGES_TXT} ${INDEX_SGML} ${HTML_INDEX} ${LOCAL_CSS_SHEET}
488
	     ${LOCAL_IMAGES_TXT} ${HTML_INDEX} ${LOCAL_CSS_SHEET}
489
	${GEN_INDEX_SGML_CMD}
483
	${JADE_CMD} -V nochunks ${HTMLOPTS} -ioutput.html.images \
490
	${JADE_CMD} -V nochunks ${HTMLOPTS} -ioutput.html.images \
484
		${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
491
		${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
485
		(${RM} -f ${.TARGET} && false)
492
		(${RM} -f ${.TARGET} && false)
486
.elif ${STYLESHEET_TYPE} == "xsl"
493
.elif ${STYLESHEET_TYPE} == "xsl"
487
${DOC}.html: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
494
${DOC}.html: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
488
	${INDEX_SGML} ${LOCAL_CSS_SHEET}     
495
	${LOCAL_CSS_SHEET}     
496
	${GEN_INDEX_SGML_CMD}
489
	${XSLTPROC} ${XSLTPROCOPTS} --param freebsd.output.html.images "'1'" ${XSLHTML} \
497
	${XSLTPROC} ${XSLTPROCOPTS} --param freebsd.output.html.images "'1'" ${XSLHTML} \
490
		${DOC}.xml > ${.TARGET}
498
		${DOC}.xml > ${.TARGET}
491
.endif
499
.endif
492
.if !defined(NO_TIDY)
500
.if !defined(NO_TIDY)
493
	-${TIDY} ${TIDYOPTS} ${.TARGET}
501
	-${TIDY} ${TIDYOPTS} ${.TARGET}
Lines 495-510 Link Here
495
503
496
# HTML-TEXT --------------------------------------------------------------
504
# HTML-TEXT --------------------------------------------------------------
497
505
498
# Special target to produce HTML with no images in it.
506
# Special target to produce HTML with no images in it.
499
.if ${STYLESHEET_TYPE} == "dsssl"
507
.if ${STYLESHEET_TYPE} == "dsssl"
500
${DOC}.html-text: ${SRCS} ${INDEX_SGML} ${HTML_INDEX} ${LOCAL_IMAGES_TXT}
508
${DOC}.html-text: ${SRCS} ${HTML_INDEX} ${LOCAL_IMAGES_TXT}
509
	${GEN_INDEX_SGML_CMD}
501
	${JADE_CMD} -V nochunks ${HTMLTXTOPTS} \
510
	${JADE_CMD} -V nochunks ${HTMLTXTOPTS} \
502
		${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
511
		${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
503
		(${RM} -f ${.TARGET} && false)
512
		(${RM} -f ${.TARGET} && false)
504
.elif ${STYLESHEET_TYPE} == "xsl"
513
.elif ${STYLESHEET_TYPE} == "xsl"
505
${DOC}.html-text: ${DOC}.xml ${INDEX_SGML} ${HTML_INDEX}
514
${DOC}.html-text: ${DOC}.xml ${HTML_INDEX}
515
	${GEN_INDEX_SGML_CMD}
506
	${XSLTPROC} ${XSLTPROCOPTS} --param freebsd.output.html.images "'0'" ${XSLHTML} \
516
	${XSLTPROC} ${XSLTPROCOPTS} --param freebsd.output.html.images "'0'" ${XSLHTML} \
507
		${DOC}.xml > ${.TARGET}
517
		${DOC}.xml > ${.TARGET}
508
.endif
518
.endif
509
519
510
${DOC}.html-split.tar: HTML.manifest ${LOCAL_IMAGES_LIB} \
520
${DOC}.html-split.tar: HTML.manifest ${LOCAL_IMAGES_LIB} \
Lines 556-566 Link Here
556
.endfor
566
.endfor
557
567
558
# RTF --------------------------------------------------------------------
568
# RTF --------------------------------------------------------------------
559
569
560
.if !defined(NO_TEX)
570
.if !defined(NO_TEX)
561
${DOC}.rtf: ${SRCS} ${LOCAL_IMAGES_EPS} ${LOCAL_IMAGES_TXT}
571
${DOC}.rtf: ${SRCS} ${LOCAL_IMAGES_EPS} ${PRINT_INDEX} \
572
		${LOCAL_IMAGES_TXT} ${LOCAL_IMAGES_PNG}
573
	${GEN_INDEX_SGML_CMD}
562
	${JADE_CMD} -V rtf-backend ${PRINTOPTS} -ioutput.rtf.images \
574
	${JADE_CMD} -V rtf-backend ${PRINTOPTS} -ioutput.rtf.images \
563
		${JADEOPTS} -t rtf -o ${.TARGET} ${MASTERDOC}
575
		${JADEOPTS} -t rtf -o ${.TARGET} ${MASTERDOC}
564
576
565
${DOC}.rtf.tar: ${DOC}.rtf ${LOCAL_IMAGES_PNG}
577
${DOC}.rtf.tar: ${DOC}.rtf ${LOCAL_IMAGES_PNG}
566
	${TAR} cf ${.TARGET} ${DOC}.rtf ${IMAGES_PNG:N*share*}
578
	${TAR} cf ${.TARGET} ${DOC}.rtf ${IMAGES_PNG:N*share*}
Lines 574-594 Link Here
574
# to use different image formats, which are chosen at the .tex stage.  So,
586
# to use different image formats, which are chosen at the .tex stage.  So,
575
# we need to create a different .tex file depending on our eventual output
587
# we need to create a different .tex file depending on our eventual output
576
# format, which will then lead on to a different .dvi file as well.
588
# format, which will then lead on to a different .dvi file as well.
577
#
589
#
578
590
579
${DOC}.tex: ${SRCS} ${LOCAL_IMAGES_EPS} ${INDEX_SGML} ${PRINT_INDEX} \
591
${DOC}.tex: ${SRCS} ${LOCAL_IMAGES_EPS} ${PRINT_INDEX} \
580
		${LOCAL_IMAGES_TXT} ${LOCAL_IMAGES_EN}
592
		${LOCAL_IMAGES_TXT} ${LOCAL_IMAGES_EN}
593
	${GEN_INDEX_SGML_CMD}
581
	${JADE_CMD} -V tex-backend ${PRINTOPTS} \
594
	${JADE_CMD} -V tex-backend ${PRINTOPTS} \
582
		${JADEOPTS} -t tex -o ${.TARGET} ${MASTERDOC}
595
		${JADEOPTS} -t tex -o ${.TARGET} ${MASTERDOC}
583
596
584
${DOC}.tex-ps: ${DOC}.tex
597
${DOC}.tex-ps: ${DOC}.tex
585
	${LN} -f ${.ALLSRC} ${.TARGET}
598
	${LN} -f ${.ALLSRC} ${.TARGET}
586
599
587
.if !target(${DOC}.tex-pdf)
600
.if !target(${DOC}.tex-pdf)
588
${DOC}.tex-pdf: ${SRCS} ${IMAGES_PDF} ${INDEX_SGML} ${PRINT_INDEX} \
601
${DOC}.tex-pdf: ${SRCS} ${IMAGES_PDF} ${PRINT_INDEX} \
589
		${LOCAL_IMAGES_TXT}
602
		${LOCAL_IMAGES_TXT}
603
	${GEN_INDEX_SGML_CMD}
590
	${RM} -f ${.TARGET}
604
	${RM} -f ${.TARGET}
591
	${CAT} ${PDFTEX_DEF} > ${.TARGET}
605
	${CAT} ${PDFTEX_DEF} > ${.TARGET}
592
	${JADE_CMD} -V tex-backend ${PRINTOPTS} -ioutput.print.pdf \
606
	${JADE_CMD} -V tex-backend ${PRINTOPTS} -ioutput.print.pdf \
593
		${JADEOPTS} -t tex -o /dev/stdout ${MASTERDOC} >> ${.TARGET}
607
		${JADEOPTS} -t tex -o /dev/stdout ${MASTERDOC} >> ${.TARGET}
594
.endif
608
.endif
Lines 674-695 Link Here
674
#
688
#
675
# If we're not generating an index (the default) then we need to create
689
# If we're not generating an index (the default) then we need to create
676
# an empty index.sgml file so that we can reference index.sgml in book.sgml
690
# an empty index.sgml file so that we can reference index.sgml in book.sgml
677
#
691
#
678
692
679
${INDEX_SGML}:
680
	${PERL} ${COLLATEINDEX} -i doc-index -N -o ${.TARGET}
681
693
682
${HTML_INDEX}:
694
${HTML_INDEX}: ${SRCS} ${LOCAL_IMAGES_TXT}
695
	${INIT_INDEX_SGML_CMD}
683
	${JADE_CMD} -V html-index -V nochunks ${HTMLOPTS} -ioutput.html.images \
696
	${JADE_CMD} -V html-index -V nochunks ${HTMLOPTS} -ioutput.html.images \
684
		${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
697
		${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
685
	${PERL} ${COLLATEINDEX} -i doc-index -g -o ${INDEX_SGML} ${.TARGET}
686
698
687
${HTML_SPLIT_INDEX}:
699
${HTML_SPLIT_INDEX}: ${SRCS} ${LOCAL_IMAGES_TXT}
700
	${INIT_INDEX_SGML_CMD}
688
	${JADE_CMD} -V html-index ${HTMLOPTS} -ioutput.html.images \
701
	${JADE_CMD} -V html-index ${HTMLOPTS} -ioutput.html.images \
689
		${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
702
		${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
690
	${PERL} ${COLLATEINDEX} -i doc-index -g -o ${INDEX_SGML} ${.TARGET}
691
703
692
.if !target(${PRINT_INDEX})
704
.if !target(${PRINT_INDEX})
693
${PRINT_INDEX}: ${HTML_INDEX}
705
${PRINT_INDEX}: ${HTML_INDEX}
694
	${CP} -p ${HTML_INDEX} ${.TARGET}
706
	${CP} -p ${HTML_INDEX} ${.TARGET}
695
.endif
707
.endif

Return to bug 90255