| 1 |
######################################################################## |
| 2 |
# Makefile for producing HTML and LaTeX (and thence, DVI and |
| 3 |
# Postscript) versions of the SGML documentation. |
| 4 |
# |
| 5 |
# version 1.03 |
| 6 |
# |
| 7 |
# *** NOTE *** |
| 8 |
# |
| 9 |
# This will _not_ work unless you have the Docbook 2.2.1 DTD properly |
| 10 |
# installed on your system, and sgmls or nsgmls can find it using the |
| 11 |
# public identifier "-//HaL and O'Reilly//DTD DocBook//EN". You will |
| 12 |
# also need the character-entity files with the public identifiers |
| 13 |
# |
| 14 |
# "ISO 8879:1986//ENTITIES Publishing//EN" |
| 15 |
# and |
| 16 |
# "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" |
| 17 |
# |
| 18 |
# installed. Copies of the source files for these are included in |
| 19 |
# the Extras/ subdirectory. |
| 20 |
######################################################################## |
| 21 |
|
| 22 |
# |
| 23 |
# Beginning of user configuration options. |
| 24 |
# |
| 25 |
|
| 26 |
# Which program do you use: sgmls or nsgmls? |
| 27 |
SGMLS = nsgmls |
| 28 |
|
| 29 |
# What is the command for running LaTeX on a file? |
| 30 |
LATEX = latex |
| 31 |
|
| 32 |
# Do you want to supply a full path for sgmlspl? |
| 33 |
SGMLSPL = sgmlspl |
| 34 |
|
| 35 |
# If you want Postscript, what is the command for converting DVI to Postscript? |
| 36 |
DVIPS = dvips |
| 37 |
|
| 38 |
# What SGML declaration do you use with the Docbook 2.2.1 DTD? |
| 39 |
SGMLDECL = /usr/local/lib/sgml/sgmldecl/docbook.dcl |
| 40 |
|
| 41 |
# |
| 42 |
# End of user configuration options. |
| 43 |
# |
| 44 |
|
| 45 |
SHELL = /bin/sh |
| 46 |
LATEXSPEC = tolatex.pl |
| 47 |
HTMLSPEC = tohtml.pl |
| 48 |
|
| 49 |
all: latex html |
| 50 |
|
| 51 |
latex: LaTeX/sgmlspm.tex LaTeX/sgmlspl.tex |
| 52 |
dvi: LaTeX/sgmlspm.dvi LaTeX/sgmlspl.dvi |
| 53 |
ps: PS/sgmlspm.ps PS/sgmlspl.ps |
| 54 |
html: HTML/SGMLSpm/sgmlspm.html HTML/sgmlspl/sgmlspl.html |
| 55 |
|
| 56 |
|
| 57 |
LaTeX/sgmlspm.tex: sgmlspm.sgml ${LATEXSPEC} |
| 58 |
@echo Converting sgmlspm.sgml to LaTeX...; \ |
| 59 |
cd LaTeX; ln -sf ../sample.pl .; \ |
| 60 |
if [ \! -r sgmlspm.refs -o -r .redo_sgmlspm ]; then \ |
| 61 |
echo \(Preliminary LaTeX pass for sgmlspm.sgml...\); \ |
| 62 |
${SGMLS} ${SGMLDECL} ../sgmlspm.sgml \ |
| 63 |
| $(SGMLSPL) ../${LATEXSPEC} sgmlspm > sgmlspm.tex; \ |
| 64 |
fi; \ |
| 65 |
echo \(Main LaTeX pass for sgmlspm.sgml...\); \ |
| 66 |
${SGMLS} ${SGMLDECL} ../sgmlspm.sgml \ |
| 67 |
| $(SGMLSPL) ../${LATEXSPEC} sgmlspm >sgmlspm.tex |
| 68 |
|
| 69 |
LaTeX/sgmlspm.dvi: LaTeX/sgmlspm.tex |
| 70 |
@echo Converting sgmlspm.tex to DVI...; \ |
| 71 |
cd LaTeX; ${LATEX} sgmlspm.tex; ${LATEX} sgmlspm.tex |
| 72 |
|
| 73 |
PS/sgmlspm.ps: LaTeX/sgmlspm.dvi |
| 74 |
@echo Converting sgmlspm.dvi to Postscript...; \ |
| 75 |
${DVIPS} -o PS/sgmlspm.ps LaTeX/sgmlspm.dvi |
| 76 |
|
| 77 |
HTML/SGMLSpm/sgmlspm.html: sgmlspm.sgml ${HTMLSPEC} |
| 78 |
@cd HTML/SGMLSpm; ln -sf ../../sample.pl .; \ |
| 79 |
echo Converting sgmlspm.sgml to HTML...; \ |
| 80 |
if [ \! -r sgmlspm.refs -o -r .redo_sgmlspm ]; then \ |
| 81 |
echo \(Preliminary HTML pass for sgmlspm.sgml...\); \ |
| 82 |
${SGMLS} ${SGMLDECL} ../../sgmlspm.sgml \ |
| 83 |
| $(SGMLSPL) ../../${HTMLSPEC} sgmlspm; \ |
| 84 |
fi; \ |
| 85 |
echo \(Main HTML pass for sgmlspm.sgml...\); \ |
| 86 |
${SGMLS} ${SGMLDECL} ../../sgmlspm.sgml \ |
| 87 |
| $(SGMLSPL) ../../${HTMLSPEC} sgmlspm; |
| 88 |
|
| 89 |
LaTeX/sgmlspl.tex: sgmlspl.sgml ${LATEXSPEC} |
| 90 |
@echo Converting sgmlspl.sgml to LaTeX...; \ |
| 91 |
cd LaTeX; \ |
| 92 |
if [ \! -r sgmlspl.refs -o -r .redo_sgmlspl ]; then \ |
| 93 |
echo \(Preliminary LaTeX pass for sgmlspl.sgml...\); \ |
| 94 |
${SGMLS} ${SGMLDECL} ../sgmlspl.sgml \ |
| 95 |
| $(SGMLSPL) ../${LATEXSPEC} sgmlspl > sgmlspl.tex; \ |
| 96 |
fi; \ |
| 97 |
echo \(Main LaTeX pass for sgmlspl.sgml...\); \ |
| 98 |
${SGMLS} ${SGMLDECL} ../sgmlspl.sgml \ |
| 99 |
| $(SGMLSPL) ../${LATEXSPEC} sgmlspl > sgmlspl.tex |
| 100 |
|
| 101 |
LaTeX/sgmlspl.dvi: LaTeX/sgmlspl.tex |
| 102 |
@echo Converting sgmlspl.tex to DVI...; \ |
| 103 |
cd LaTeX; \ |
| 104 |
${LATEX} sgmlspl.tex; ${LATEX} sgmlspl.tex |
| 105 |
|
| 106 |
PS/sgmlspl.ps: LaTeX/sgmlspl.dvi |
| 107 |
@echo Converting sgmlspl.dvi to Postscript...; \ |
| 108 |
${DVIPS} -o PS/sgmlspl.ps LaTeX/sgmlspl.dvi |
| 109 |
|
| 110 |
HTML/sgmlspl/sgmlspl.html: sgmlspl.sgml ${HTMLSPEC} |
| 111 |
@cd HTML/sgmlspl; \ |
| 112 |
echo Converting sgmlspl.sgml to HTML...; \ |
| 113 |
if [ ! -r sgmlspl.refs -o -r .redo_sgmlspl ]; then \ |
| 114 |
echo \(Preliminary HTML pass for sgmlspl.sgml...\); \ |
| 115 |
${SGMLS} ${SGMLDECL} ../../sgmlspl.sgml \ |
| 116 |
| $(SGMLSPL) ../../${HTMLSPEC} sgmlspl; \ |
| 117 |
fi; \ |
| 118 |
echo \(Main HTML pass for sgmlspl.sgml...\); \ |
| 119 |
${SGMLS} ${SGMLDECL} ../../sgmlspl.sgml \ |
| 120 |
| $(SGMLSPL) ../../${HTMLSPEC} sgmlspl; |
| 121 |
|
| 122 |
clean: |
| 123 |
rm -f *~ core LaTeX/* HTML/SGMLSpm/* HTML/sgmlspl/* PS/* |
| 124 |
|