1 | ##################################################################### |
---|
2 | ### |
---|
3 | ### Makefile for Singular documentation |
---|
4 | ### |
---|
5 | ##################################################################### |
---|
6 | SHELL=/bin/sh |
---|
7 | |
---|
8 | #################################################################### |
---|
9 | ## |
---|
10 | ## Configuration |
---|
11 | ## |
---|
12 | |
---|
13 | ## directory where info files are installed |
---|
14 | prefix = @prefix@ |
---|
15 | infodir = ${prefix}/info |
---|
16 | |
---|
17 | ## |
---|
18 | ## needed programs |
---|
19 | ## |
---|
20 | @SET_MAKE@ |
---|
21 | CC = @CC@ |
---|
22 | INSTALL = ../install-sh -c |
---|
23 | INSTALL_PROGRAM = ${INSTALL} |
---|
24 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
25 | MKINSTALLDIRS = ../mkinstalldirs |
---|
26 | |
---|
27 | TEX = tex |
---|
28 | MAKEINFO = makeinfo |
---|
29 | TEXI2DVI = texi2dvi |
---|
30 | TEXINDEX = texindex |
---|
31 | DVIPS = dvips |
---|
32 | IMAGES = contents_motif.gif index_motif.gif \ |
---|
33 | next_motif.gif next_motif_gr.gif \ |
---|
34 | previous_motif.gif previous_motif_gr.gif \ |
---|
35 | singular-small.jpg singular.jpg \ |
---|
36 | invisible.xbm bg_left.gif bg_right.gif |
---|
37 | |
---|
38 | SINGULAR = @SINGULAR@ |
---|
39 | ## |
---|
40 | ## End configuration dependend stuff |
---|
41 | ################################################################# |
---|
42 | |
---|
43 | # files |
---|
44 | TEX_FILES = copyright.tex |
---|
45 | DOC2TEX_FILES = \ |
---|
46 | examples.tex general.tex math.tex reference.tex \ |
---|
47 | singular.tex start.tex types.tex pdata.tex |
---|
48 | |
---|
49 | MANUAL_FILES = ${TEX_FILES} ${DOC2TEX_FILES} |
---|
50 | TUTOR_FILES = \ |
---|
51 | tutor.tex examples.tex start.tex copyright.tex |
---|
52 | |
---|
53 | .PHONY: info dvi ps |
---|
54 | # default target |
---|
55 | all: info dvi html |
---|
56 | |
---|
57 | # info stuff |
---|
58 | info: singular.hlp |
---|
59 | |
---|
60 | singular.hlp: ${MANUAL_FILES} |
---|
61 | - ${MAKEINFO} --no-split singular.tex |
---|
62 | |
---|
63 | # dvi stuff |
---|
64 | dvi: singular.dvi usercard.dvi |
---|
65 | |
---|
66 | singular.dvi: ${MANUAL_FILES} |
---|
67 | ${TEXI2DVI} singular.tex |
---|
68 | |
---|
69 | tutor.dvi: ${TUTOR_FILES} |
---|
70 | ${TEXI2DVI} tutor.tex |
---|
71 | |
---|
72 | usercard.dvi: usercard.tex singcard.tex |
---|
73 | ${TEX} $< |
---|
74 | |
---|
75 | # postscript stuff |
---|
76 | ps: singular.ps usercard.ps |
---|
77 | |
---|
78 | usercard.ps: usercard.dvi |
---|
79 | ${DVIPS} -t landscape $< -o $@ |
---|
80 | |
---|
81 | %.ps: %.dvi |
---|
82 | ${DVIPS} $< -o $@ |
---|
83 | |
---|
84 | # html stuff |
---|
85 | html: ${MANUAL_FILES} |
---|
86 | test -d html || mkdir html |
---|
87 | cd html && ../texi2html -I .. -menu -expandinfo -number -split_node -verbose ../singular.tex |
---|
88 | test -d html/images || mkdir html/images |
---|
89 | for img in ${IMAGES}; \ |
---|
90 | do \ |
---|
91 | echo uudecode images/$${img}.uu; \ |
---|
92 | uudecode images/$${img}.uu; \ |
---|
93 | done |
---|
94 | touch html |
---|
95 | |
---|
96 | # html stuff |
---|
97 | html_tutor: ${TUTOR_FILES} |
---|
98 | test -d html_tutor || mkdir html_tutor |
---|
99 | cd html_tutor && ../texi2html -I .. -menu -expandinfo -number -split_node -verbose ../tutor.tex |
---|
100 | test -d html || mkdir html |
---|
101 | test -d html/images || mkdir html/images |
---|
102 | for img in ${IMAGES}; \ |
---|
103 | do \ |
---|
104 | echo uudecode images/$${img}.uu; \ |
---|
105 | uudecode images/$${img}.uu; \ |
---|
106 | done |
---|
107 | test -e html_tutor/images || (cd html_tutor; ln -s ../html/images images) |
---|
108 | touch html_tutor |
---|
109 | |
---|
110 | # how to create the texinfo files |
---|
111 | %.tex: %.doc doc2tex ${SINGULAR} |
---|
112 | @ echo |
---|
113 | @ echo "Be sure Singular is up-to-date before making the examples!" |
---|
114 | @ echo |
---|
115 | ./doc2tex ${SINGULAR} $* |
---|
116 | - grep "error occurred" $@ |
---|
117 | |
---|
118 | doc2tex: doc2tex.c |
---|
119 | $(CC) doc2tex.c -o doc2tex |
---|
120 | |
---|
121 | # targets concerned with maintenance |
---|
122 | install: singular.hlp |
---|
123 | ${MKINSTALLDIRS} ${infodir} |
---|
124 | ${INSTALL_DATA} singular.hlp ${infodir} |
---|
125 | |
---|
126 | uninstall: |
---|
127 | rm -f ${infodir}/singular.hlp |
---|
128 | - rmdir ${infodir} |
---|
129 | |
---|
130 | clean: |
---|
131 | /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt |
---|
132 | /bin/rm -f save_i test.ascii test.mp |
---|
133 | /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps |
---|
134 | /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp |
---|
135 | /bin/rm -f *.tps *.vr *.vrs |
---|
136 | /bin/rm -f doc2tex singular.hlp *.dvi *.ps ${DOC2TEX_FILES} |
---|
137 | /bin/rm -rf html |
---|
138 | |
---|
139 | mostlyclean: clean |
---|
140 | |
---|
141 | distclean: mostlyclean |
---|
142 | /bin/rm -f Makefile |
---|
143 | |
---|
144 | maintainer-clean: distclean |
---|
145 | |
---|
146 | ${SINGULAR}: |
---|
147 | # cd ..; ${MAKE} ${SINGULAR} |
---|
148 | |
---|
149 | Makefile: Makefile.in |
---|
150 | cd ..; ${MAKE} doc/Makefile |
---|
151 | |
---|
152 | html-done: ${MANUAL_FILES} |
---|
153 | |
---|