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