source: git/doc/Makefile.in @ c84d678

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