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