]> git.saurik.com Git - wxWidgets.git/blame - src/gtk1/setup/general/makedoc
Dang, can't remember what I changed now
[wxWidgets.git] / src / gtk1 / setup / general / makedoc
CommitLineData
c801d85f
KB
1SHELL=/bin/sh
2
3FILE_BASE=$(TEX_BASE:.tex=)
4
5BMP_FILES=$(XPM_FILES:.xpm=.bmp)
6EPS_FILES=$(XPM_FILES:.xpm=.eps)
7GIF_FILES=$(XPM_FILES:.xpm=.gif)
8
9HTML_BUTTONS=back.gif forward.gif contents.gif up.gif
10
11all:: doc
12
13clean::
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
22doc:: doc_ps doc_html doc_xlp doc_winhelp doc_rtf
23
24#############################################
25
26doc_ps:: $(FILE_BASE).ps
27
28$(FILE_BASE).ps: $(FILE_BASE).dvi
29 dvips $(FILE_BASE).dvi -o$@
30
31#############################################
32
33doc_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
41doc_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
48doc_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
58doc_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
65doc_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
73subst::
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 - > $@