source: git/doc/Makefile.in @ 9ead31

spielwiese
Last change on this file since 9ead31 was 9ead31, checked in by Olaf Bachmann <obachman@…>, 24 years ago
* chcek for ptograms git-svn-id: file:///usr/local/Singular/svn/trunk@3971 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 9.2 KB
Line 
1#####################################################################
2###
3### Makefile for Singular documentation
4### $Id: Makefile.in,v 1.49 1999-12-08 14:47:00 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
87DOC2TEX_FILES   = \
88                examples.tex general.tex math.tex reference.tex \
89                start.tex types.tex pdata.tex tricks.tex platform.tex
90
91MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
92TUTOR_FILES     = \
93                tutor.tex examples.tex start.tex copyright.tex
94
95IMAGES_UU       := $(wildcard images/*.uu)
96IMAGES     := $(IMAGES_UU:images/%.uu=%)
97IMAGES_SRC := $(IMAGES:%=images/%)
98IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
99
100# prepend bindir to path so that programs from there are taken first
101export PATH := "${bindir}:${PATH}"
102
103###########################################################
104# top targets
105#
106
107.PHONY: info dvi ps html
108
109# default target
110all: info dvi html singular.idx
111
112# info stuff
113info: singular.hlp
114
115singular.hlp: ${MANUAL_FILES} singular.tex
116        - ${MAKEINFO} --no-split singular.tex
117
118# dvi stuff
119dvi: manual.dvi usercard.dvi
120
121singular.dvi: ${MANUAL_FILES} singular.tex
122        ${TEXI2DVI} singular.tex
123
124manual.dvi: ${MANUAL_FILES} manual.tex
125        ${TEXI2DVI} manual.tex
126
127tutor.dvi: ${TUTOR_FILES}
128        ${TEXI2DVI} tutor.tex
129
130usercard.dvi: usercard.tex singcard.tex
131        ${TEX} $<
132
133# postscript stuff
134ps: manual.ps usercard.ps
135
136usercard.ps: usercard.dvi
137        ${DVIPS} -t landscape -t a4 $< -o $@
138
139%.ps: %.dvi
140        ${DVIPS} $< -o $@
141
142###########################################################
143# texinfo targets
144#
145manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
146        ${DOC2TEX} -no_fun -o manual.tex singular.doc
147
148singular.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
173singular.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
180STANDALONE_TXT_FILES := $(STANDALONE_TEXI_FILES:.texi=.txt)
181STANDALONE_HTML_FILES := $(STANDALONE_TEXI_FILES:.texi=.html)
182STANDALONE_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
200standalone: standalone-txt standalone-html ${STANDALONE_FILES}
201
202standalone-html: ${STANDALONE_HTML_FILES}
203standalone-txt:  ${STANDALONE_TXT_FILES}
204
205
206###########################################################
207# html targets
208#
209html: ${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
215html_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
223images/%.gif : images/%.gif.uu
224        uudecode $< -o $@
225
226images/%.jpg : images/%.jpg.uu
227        uudecode $< -o $@
228
229images/%.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#
243install: 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
249uninstall:
250        rm -f ${infodir}/singular.hlp
251        - rmdir ${infodir}
252
253install-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
268install-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
273install-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
283texi2html = $(TEXI2HTML:%.pl=%)
284
285lib2doc.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
294clean: mostlyclean
295        /bin/rm -rf singular.tex manual.tex ${DOC_SUBDIR} ${EX_SUBDIR}
296
297mostlyclean:
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
308distclean: clean
309        /bin/rm -f Makefile
310        /bin/rm -f ${HTML_SUBDIR}
311
312maintainer-clean: distclean
313
314${SINGULAR}:
315#       cd ..; ${MAKE} ${SINGULAR}
316
317Makefile: Makefile.in
318        cd ..; ${MAKE} doc/Makefile
319
320html-done: ${MANUAL_FILES}
321
Note: See TracBrowser for help on using the repository browser.