1 ########################################################################
2 # Makefile for producing HTML and LaTeX (and thence, DVI and
3 # Postscript) versions of the SGML documentation.
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
14 # "ISO 8879:1986//ENTITIES Publishing//EN"
16 # "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN"
18 # installed. Copies of the source files for these are included in
19 # the Extras/ subdirectory.
20 ########################################################################
23 # Beginning of user configuration options.
26 # Which program do you use: sgmls or nsgmls?
29 # What is the command for running LaTeX on a file?
32 # Do you want to supply a full path for sgmlspl?
35 # If you want Postscript, what is the command for converting DVI to Postscript?
38 # What SGML declaration do you use with the Docbook 2.2.1 DTD?
39 SGMLDECL = /usr/local/lib/sgml/sgmldecl/docbook.dcl
42 # End of user configuration options.
46 LATEXSPEC = tolatex.pl
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
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; \
65 echo \(Main LaTeX pass for sgmlspm.sgml...\); \
66 ${SGMLS} ${SGMLDECL} ../sgmlspm.sgml \
67 | $(SGMLSPL) ../${LATEXSPEC} sgmlspm >sgmlspm.tex
69 LaTeX/sgmlspm.dvi: LaTeX/sgmlspm.tex
70 @echo Converting sgmlspm.tex to DVI...; \
71 cd LaTeX; ${LATEX} sgmlspm.tex; ${LATEX} sgmlspm.tex
73 PS/sgmlspm.ps: LaTeX/sgmlspm.dvi
74 @echo Converting sgmlspm.dvi to Postscript...; \
75 ${DVIPS} -o PS/sgmlspm.ps LaTeX/sgmlspm.dvi
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; \
85 echo \(Main HTML pass for sgmlspm.sgml...\); \
86 ${SGMLS} ${SGMLDECL} ../../sgmlspm.sgml \
87 | $(SGMLSPL) ../../${HTMLSPEC} sgmlspm;
89 LaTeX/sgmlspl.tex: sgmlspl.sgml ${LATEXSPEC}
90 @echo Converting sgmlspl.sgml to 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; \
97 echo \(Main LaTeX pass for sgmlspl.sgml...\); \
98 ${SGMLS} ${SGMLDECL} ../sgmlspl.sgml \
99 | $(SGMLSPL) ../${LATEXSPEC} sgmlspl > sgmlspl.tex
101 LaTeX/sgmlspl.dvi: LaTeX/sgmlspl.tex
102 @echo Converting sgmlspl.tex to DVI...; \
104 ${LATEX} sgmlspl.tex; ${LATEX} sgmlspl.tex
106 PS/sgmlspl.ps: LaTeX/sgmlspl.dvi
107 @echo Converting sgmlspl.dvi to Postscript...; \
108 ${DVIPS} -o PS/sgmlspl.ps LaTeX/sgmlspl.dvi
110 HTML/sgmlspl/sgmlspl.html: sgmlspl.sgml ${HTMLSPEC}
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; \
118 echo \(Main HTML pass for sgmlspl.sgml...\); \
119 ${SGMLS} ${SGMLDECL} ../../sgmlspl.sgml \
120 | $(SGMLSPL) ../../${HTMLSPEC} sgmlspl;
123 rm -f *~ core LaTeX/* HTML/SGMLSpm/* HTML/sgmlspl/* PS/*