1 | ##################################################################### |
---|
2 | ### |
---|
3 | ### Makefile for Singular documentation |
---|
4 | ### $Id: Makefile.in,v 1.41 1999-11-24 18:50:40 obachman Exp $ |
---|
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 | bindir = @bindir@ |
---|
17 | htmldir = ${prefix}/html |
---|
18 | install_infodir = ${install_prefix}/info |
---|
19 | install_htmldir = ${install_prefix}/html |
---|
20 | install_docdir = ${install_prefix}/doc |
---|
21 | |
---|
22 | ## |
---|
23 | ## needed programs |
---|
24 | ## |
---|
25 | @SET_MAKE@ |
---|
26 | LN_S = @LN_S@ |
---|
27 | CC = @CC@ |
---|
28 | INSTALL = ../install-sh -c |
---|
29 | INSTALL_PROGRAM = ${INSTALL} |
---|
30 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
31 | MKINSTALLDIRS = ../mkinstalldirs |
---|
32 | |
---|
33 | PERL5 = @PERL5@ |
---|
34 | TEX = tex |
---|
35 | MAKEINFO = @MAKEINFO@ |
---|
36 | TEXI2DVI = @TEXI2DVI@ |
---|
37 | TEXINDEX = @TEXINDEX@ |
---|
38 | TEXI2HTML = @TEXI2HTML@ |
---|
39 | DVIPS = dvips |
---|
40 | VERBOSE = 1 # override this with make VERBOSE=2 |
---|
41 | |
---|
42 | # d2t stuff |
---|
43 | SINGULAR = @SINGULAR@ |
---|
44 | SINGULAR_LIB_DIR= ../Singular/LIB |
---|
45 | LIBPARSE = ${bindir}/libparse |
---|
46 | D2T_SUBDIR = ./d2t_singular |
---|
47 | CHKSUM_DB = ${D2T_SUBDIR}/chksum |
---|
48 | DOC2TEX = ${PERL5} ./doc2tex.pl -subdir ${D2T_SUBDIR} \ |
---|
49 | -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} |
---|
50 | PL2DOC = ${PERL5} ./pl2doc.pl -db ${CHKSUM_DB} |
---|
51 | |
---|
52 | # t2h stuff |
---|
53 | TMP_DIR = @TMP_DIR@ |
---|
54 | HTML_SUBDIR = html |
---|
55 | TEXI2HTML_INIT = t2h_singular.init |
---|
56 | ifeq ($(VERBOSE),0) |
---|
57 | T2H_VERBOSE = -no_verbose |
---|
58 | else |
---|
59 | T2H_VERBOSE = -verbose |
---|
60 | endif |
---|
61 | TEXI2HTML_OPTS = -init_file ${TEXI2HTML_INIT} @TEXI2HTML_OPTS@ \ |
---|
62 | -short_extn -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \ |
---|
63 | ${T2H_VERBOSE} |
---|
64 | HTML_MANUAL_PREFIX = sing |
---|
65 | HTML_TUTOR_PREFIX = tut |
---|
66 | HTML_MANUAL_TOP = index.htm |
---|
67 | HTML_TUTOR_TOP = tutor.htm |
---|
68 | ## |
---|
69 | ## End configuration dependend stuff |
---|
70 | ################################################################# |
---|
71 | |
---|
72 | ########################################################### |
---|
73 | # File sets |
---|
74 | # |
---|
75 | TEX_FILES = copyright.tex |
---|
76 | DOC2TEX_FILES = \ |
---|
77 | examples.tex general.tex math.tex reference.tex \ |
---|
78 | start.tex types.tex pdata.tex tricks.tex platform.tex |
---|
79 | |
---|
80 | MANUAL_FILES = ${TEX_FILES} ${DOC2TEX_FILES} |
---|
81 | TUTOR_FILES = \ |
---|
82 | tutor.tex examples.tex start.tex copyright.tex |
---|
83 | |
---|
84 | IMAGES_UU := $(wildcard images/*.uu) |
---|
85 | IMAGES := $(IMAGES_UU:images/%.uu=%) |
---|
86 | IMAGES_SRC := $(IMAGES:%=images/%) |
---|
87 | IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%) |
---|
88 | |
---|
89 | # prepend bindir to path so that programs from there are taken first |
---|
90 | export PATH := "${bindir}:${PATH}" |
---|
91 | |
---|
92 | ########################################################### |
---|
93 | # top targets |
---|
94 | # |
---|
95 | |
---|
96 | .PHONY: info dvi ps html |
---|
97 | |
---|
98 | # default target |
---|
99 | all: info dvi html singular.idx |
---|
100 | |
---|
101 | # info stuff |
---|
102 | info: singular.hlp |
---|
103 | |
---|
104 | singular.hlp: ${MANUAL_FILES} singular.tex |
---|
105 | - ${MAKEINFO} --no-split singular.tex |
---|
106 | |
---|
107 | # dvi stuff |
---|
108 | dvi: manual.dvi usercard.dvi |
---|
109 | |
---|
110 | singular.dvi: ${MANUAL_FILES} singular.tex |
---|
111 | ${TEXI2DVI} singular.tex |
---|
112 | |
---|
113 | manual.dvi: ${MANUAL_FILES} manual.tex |
---|
114 | ${TEXI2DVI} manual.tex |
---|
115 | |
---|
116 | tutor.dvi: ${TUTOR_FILES} |
---|
117 | ${TEXI2DVI} tutor.tex |
---|
118 | |
---|
119 | usercard.dvi: usercard.tex singcard.tex |
---|
120 | ${TEX} $< |
---|
121 | |
---|
122 | # postscript stuff |
---|
123 | ps: manual.ps usercard.ps |
---|
124 | |
---|
125 | usercard.ps: usercard.dvi |
---|
126 | ${DVIPS} -t landscape -t a4 $< -o $@ |
---|
127 | |
---|
128 | %.ps: %.dvi |
---|
129 | ${DVIPS} $< -o $@ |
---|
130 | |
---|
131 | ########################################################### |
---|
132 | # texinfo targets |
---|
133 | # |
---|
134 | manual.tex: ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc |
---|
135 | ${DOC2TEX} -no_fun -o manual.tex singular.doc |
---|
136 | |
---|
137 | singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc |
---|
138 | ${DOC2TEX} -o singular.tex singular.doc |
---|
139 | |
---|
140 | #pattern rule for tex files |
---|
141 | %_noEx.tex : %.doc doc2tex.pl ${SINGULAR} |
---|
142 | ${DOC2TEX} -o $@ -no_ex $< |
---|
143 | |
---|
144 | %.tex: %.doc doc2tex.pl ${SINGULAR} |
---|
145 | ${DOC2TEX} -o $@ $< |
---|
146 | |
---|
147 | # pattern rules for lib docus |
---|
148 | ${D2T_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE} |
---|
149 | test -d ${D2T_SUBDIR} || mkdir ${D2T_SUBDIR} |
---|
150 | ${LIBPARSE} -i $< > $@ |
---|
151 | |
---|
152 | %_noFun.doc : %.pl pl2doc.pl |
---|
153 | ${PL2DOC} -no_fun -o $@ $< |
---|
154 | |
---|
155 | %.doc : %.pl pl2doc.pl |
---|
156 | ${PL2DOC} -o $@ $< |
---|
157 | |
---|
158 | # do not delete intermediate .pl and .doc files |
---|
159 | .PRECIOUS: %.doc %_noFun.doc ${D2T_SUBDIR}/%_lib.pl |
---|
160 | |
---|
161 | # index file for help |
---|
162 | singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl |
---|
163 | ${PERL5} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx |
---|
164 | |
---|
165 | # targets which produce stand-alone documents |
---|
166 | COPYING: copyright.tex |
---|
167 | ${MAKEINFO} --no-header --paragraph-indent none -o COPYING copyright.tex |
---|
168 | |
---|
169 | ########################################################### |
---|
170 | # html targets |
---|
171 | # |
---|
172 | html: ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} |
---|
173 | ${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex |
---|
174 | ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \ |
---|
175 | -top_file ${HTML_MANUAL_TOP} singular.tex |
---|
176 | |
---|
177 | # html stuff |
---|
178 | html_tutor: ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML} |
---|
179 | ${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex |
---|
180 | ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \ |
---|
181 | -top_file ${HTML_TUTOR_TOP} tutor.tex |
---|
182 | |
---|
183 | ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP} |
---|
184 | |
---|
185 | # pattern rules for images |
---|
186 | images/%.gif : images/%.gif.uu |
---|
187 | uudecode $< -o $@ |
---|
188 | |
---|
189 | images/%.jpg : images/%.jpg.uu |
---|
190 | uudecode $< -o $@ |
---|
191 | |
---|
192 | images/%.xbm : images/%.xbm.uu |
---|
193 | uudecode $< -o $@ |
---|
194 | |
---|
195 | ${IMAGES_HTML} : ${IMAGES_SRC} |
---|
196 | test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR} |
---|
197 | cp ${IMAGES_SRC} ${HTML_SUBDIR} |
---|
198 | |
---|
199 | |
---|
200 | |
---|
201 | |
---|
202 | |
---|
203 | ########################################################### |
---|
204 | # misc targets |
---|
205 | # |
---|
206 | install: singular.hlp html/index.htm singular.idx |
---|
207 | ${MKINSTALLDIRS} ${infodir} |
---|
208 | ${INSTALL_DATA} singular.hlp ${infodir} |
---|
209 | test -r ${htmldir} || ln -s `pwd`/${HTML_SUBDIR} ${htmldir} |
---|
210 | |
---|
211 | uninstall: |
---|
212 | rm -f ${infodir}/singular.hlp |
---|
213 | - rmdir ${infodir} |
---|
214 | |
---|
215 | install-sharedist: singular.hlp html/index.htm singular.idx |
---|
216 | ${MKINSTALLDIRS} ${install_infodir} |
---|
217 | ${INSTALL_DATA} singular.hlp ${install_infodir} |
---|
218 | ${MKINSTALLDIRS} ${install_htmldir} |
---|
219 | cp ${HTML_SUBDIR}/* ${install_htmldir} |
---|
220 | chmod 644 ${htmldir}/* |
---|
221 | ${MKINSTALLDIRS} ${install_docdir} |
---|
222 | ${INSTALL_DATA} singular.idx ${install_docdir} |
---|
223 | |
---|
224 | texi2html = $(TEXI2HTML:%.pl=%) |
---|
225 | |
---|
226 | lib2doc.tar.gz: |
---|
227 | rm -rf lib2doc lib2doc.tar.gz |
---|
228 | mkdir lib2doc |
---|
229 | cp Makefile.lib2doc lib2doc/Makefile |
---|
230 | ${MAKEINFO} --no-header --paragraph-indent none -o lib2doc/README lib2doc.texi |
---|
231 | cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc |
---|
232 | tar cf lib2doc.tar lib2doc |
---|
233 | gzip lib2doc.tar |
---|
234 | |
---|
235 | clean: mostlyclean |
---|
236 | /bin/rm -rf singular.tex manual.tex ${HTML_SUBDIR} ${D2T_SUBDIR} |
---|
237 | |
---|
238 | mostlyclean: |
---|
239 | /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt |
---|
240 | /bin/rm -f save_i test.ascii test.mp |
---|
241 | /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps |
---|
242 | /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp |
---|
243 | /bin/rm -f *.tps *.vr *.vrs *.dvi *.ps |
---|
244 | /bin/rm -f singular.hlp manual.hlp ${DOC2TEX_FILES} singular.idx |
---|
245 | /bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} |
---|
246 | |
---|
247 | distclean: clean |
---|
248 | /bin/rm -f Makefile |
---|
249 | |
---|
250 | maintainer-clean: distclean |
---|
251 | |
---|
252 | ${SINGULAR}: |
---|
253 | # cd ..; ${MAKE} ${SINGULAR} |
---|
254 | |
---|
255 | Makefile: Makefile.in |
---|
256 | cd ..; ${MAKE} doc/Makefile |
---|
257 | |
---|
258 | html-done: ${MANUAL_FILES} |
---|
259 | |
---|