1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
|
################################################################
# Make the documentation
#
# Building the various versions of the documentation requires
# a lot of software to be at the right place. Generally, please
# pick the required version from the SWI-Prolog home page at
# http://www.swi.psy.uva.nl/projects/SWI-Prolog/
#
# If you insist building it yourself, at least check the following
#
# * Setting of the $(PL) below
# * Path to perl in doc2tex
# * Installed programs
# - latex 2e
# - pdflatex
# - latex2html from the html subdirectory of Prolog
# - gcc (for ccp as well as building modified dvi2tty)
#
################################################################
PL= ../linux/pl
CP= ln -fs
CCCP= gcc -E -C -P
DVITOTTY= ./dvi2tty
DVITOTTY-HOME= txt/dvi2tty
INDEX= makeindex
LATEX= latex
PDFTEX= pdflatex
MANUAL= ./MANUAL.dvi
PDF= MANUAL.pdf
ONLINE= ../library/MANUAL
ONLINE_INDEX= ../library/helpidx.pl
LIBFILES= lib/library.tex lib/readutil.tex lib/netscape.tex \
lib/registry.tex lib/check.tex lib/url.tex
TEXFILES= doc.tex intro.tex overview.tex builtin.tex module.tex \
foreign.tex runtime.tex hack.tex summary.tex xpce.tex \
glossary.tex ide.tex license.tex $(LIBFILES)
STYFILES= html.sty txt.sty
.SUFFIXES:
.SUFFIXES: .doc .tex
help:
@echo
@echo '"make all" creates online, PDF and HTML'
@echo '"make online" creates the help/1 database'
@echo '"make html" create HTML verstion'
@echo '"make pdf" makes $(PDF)'
@echo
@echo '"make clean" removes all temporary files'
@echo '"make distclean" lets you start from scratch'
@echo
all:
$(MAKE) online
$(MAKE) clean
$(MAKE) pdf
$(MAKE) clean
$(MAKE) html
$(MAKE) clean
dvi: doc.dvi
doc.dvi: $(TEXFILES)
env TEXINPUTS=lib:$$TEXINPUTS $(LATEX) doc
env TEXINPUTS=lib:$$TEXINPUTS $(LATEX) doc
env TEXINPUTS=lib:$$TEXINPUTS $(LATEX) doc
ps: doc.ps
doc.ps: doc.dvi
dvips $< -o $@
html: $(TEXFILES) $(STYFILES) doc.bbl
rm -rf Manual
env TEXINPUTS=lib:$$TEXINPUTS latex2html doc
pdf: $(PDF)
online: $(ONLINE) online_index
online_index: $(ONLINE_INDEX)
dvi2tty: $(DVI2TTY)
txt.sty: txt/txt.sty
cp txt/txt.sty $@
html.sty: ../packages/ltx2htm/html.sty
cp $< $@
clean:
rm -f *~ *% tmp.* *.aux *.idx *.ind *.log *.toc *.ilg
rm -f lib/*~ lib/*.tex lib/*.aux
rm -f online.* *.tex
distclean: clean
rm -f $(MANUAL) $(DVITOTTY)
rm -rf Manual
make -C$(DVITOTTY-HOME) distclean
$(PDF): doc.tex $(TEXFILES) doc.bbl
./runtex --pdf doc
mv doc.pdf $@
man: doc.tex $(TEXFILES) doc.bbl doc.ind
$(LATEX) doc
tex: $(TEXFILES)
$(TEXFILES): doc2tex
.doc.tex:
./doc2tex $*.doc > $*.tex
doc.bbl: biblio.doc
cp biblio.doc $@
htmldoc.bbl: biblio.doc
cp biblio.doc $@
online.bbl: biblio.doc
cp biblio.doc $@
doc.idx: $(TEXFILES)
$(LATEX) doc
$(ONLINE): online.dvi $(DVITOTTY)
$(DVITOTTY) -w100 online | \
cat -s | \
sed 's/\(.\)_/_\1/g' > $(ONLINE)
online.dvi: online.tex $(TEXFILES) online.bbl
./runtex online
online.doc: main.doc
cp main.doc main.h
$(CCCP) -DONLINE main.h | cat -s > online.doc
rm -f main.h
doc.doc: main.doc
cp main.doc main.h
$(CCCP) -UONLINE main.h | cat -s > doc.doc
rm -f main.h
$(ONLINE_INDEX): $(ONLINE)
MANUAL=$(ONLINE); INDEX=$(ONLINE_INDEX); export MANUAL INDEX; \
$(PL) -f none -g '[plindex],online_index' -t halt.
$(DVITOTTY):
$(MAKE) -C$(DVITOTTY-HOME) dvi2tty
$(CP) $(DVITOTTY-HOME)/dvi2tty ./$(DVITOTTY)
# EOF #
|