]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | SHELL=/bin/sh |
2 | ||
3 | FILE_BASE=$(TEX_BASE:.tex=) | |
4 | ||
5 | BMP_FILES=$(XPM_FILES:.xpm=.bmp) | |
6 | EPS_FILES=$(XPM_FILES:.xpm=.eps) | |
7 | GIF_FILES=$(XPM_FILES:.xpm=.gif) | |
8 | ||
9 | HTML_BUTTONS=back.gif forward.gif contents.gif up.gif | |
10 | ||
11 | all:: doc | |
12 | ||
13 | clean:: | |
14 | @ for each in $(DIRS) . ; do \ | |
15 | ( cd $$each; \ | |
16 | rm -f *.bmp *.eps *.gif *.aux *.dvi *.log \ | |
17 | *.ps *.toc *~ *.idx *.hlp *.html \ | |
18 | *.rtf *.ref *.xlp *.con *.win *.fts \ | |
19 | *.hpj *.HLP; \ | |
20 | ); done | |
21 | ||
22 | doc:: doc_ps doc_html doc_xlp doc_winhelp doc_rtf | |
23 | ||
24 | ############################################# | |
25 | ||
26 | doc_ps:: $(FILE_BASE).ps | |
27 | ||
28 | $(FILE_BASE).ps: $(FILE_BASE).dvi | |
29 | dvips $(FILE_BASE).dvi -o$@ | |
30 | ||
31 | ############################################# | |
32 | ||
33 | doc_dvi:: $(FILE_BASE).dvi | |
34 | ||
35 | $(FILE_BASE).dvi: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(EPS_FILES) | |
36 | latex $(FILE_BASE).tex | |
37 | latex $(FILE_BASE).tex | |
38 | ||
39 | ############################################# | |
40 | ||
41 | doc_xlp:: $(FILE_BASE).xlp | |
42 | ||
43 | $(FILE_BASE).xlp: $(FILE_BASE).tex $(TEX_ADDITIONAL) | |
44 | ../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).xlp -twice -xlp | |
45 | ||
46 | ############################################# | |
47 | ||
48 | doc_html:: $(FILE_BASE)_contents.html $(FILE_BASE).html | |
49 | ||
50 | $(FILE_BASE).html: | |
51 | @ln -s $(FILE_BASE)_contents.html $@ | |
52 | ||
53 | $(FILE_BASE)_contents.html: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(GIF_FILES) $(HTML_BUTTONS) | |
54 | ../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE) -twice -html | |
55 | ||
56 | ############################################# | |
57 | ||
58 | doc_rtf:: $(FILE_BASE).rtf | |
59 | ||
60 | $(FILE_BASE).rtf: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(BMP_FILES) | |
61 | ../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).rtf -twice -rtf | |
62 | ||
63 | ############################################# | |
64 | ||
65 | doc_winhelp:: $(FILE_BASE).win | |
66 | ||
67 | $(FILE_BASE).win: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(BMP_FILES) | |
68 | ../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).win -twice -winhelp | |
69 | @echo final conversion still needs to be done by MSWin | |
70 | ||
71 | ############################################# | |
72 | ||
73 | subst:: | |
74 | @if test "x$(OLD)" = x; then \ | |
75 | echo "OLD not defined!"; exit -1; \ | |
76 | fi | |
77 | @if test "x$(NEW)" = x; then \ | |
78 | echo "NEW not defined!"; exit -1; \ | |
79 | fi | |
80 | @for each in $(TEX_BASE) $(TEX_ADITIONAL) ; do \ | |
81 | cat $$each | sed "s/$(OLD)/$(NEW)/g" > /tmp/subst; \ | |
82 | rm $$each; cp /tmp/subst $$each; rm /tmp/subst; \ | |
83 | done | |
84 | ||
85 | ############################################# | |
86 | ||
87 | .SUFFIXES: | |
88 | .SUFFIXES: .eps .xpm | |
89 | .SUFFIXES: .bmp .xpm | |
90 | .SUFFIXES: .gif .xpm | |
91 | ||
92 | .xpm.eps : | |
93 | @$(RM) -f $@ | |
94 | xpmtoppm $< | ppmtogif | giftopnm | pnmtops -rle -center -noturn -scale 0.5 - > $@ | |
95 | ||
96 | .xpm.bmp : | |
97 | @$(RM) -f $@ | |
98 | xpmtoppm $< | ppmtobmp -windows - > $@ | |
99 | ||
100 | .xpm.gif : | |
101 | @$(RM) -f $@ | |
102 | xpmtoppm $< | ppmtogif -interlace - > $@ |