source: git/doc/Makefile.in @ 522906

jengelh-datetimespielwiese
Last change on this file since 522906 was 522906, checked in by Bernhard R. Link <brlink@…>, 11 years ago
tag more examples Add a way to tag all examples from a .lib file included. Use this new feature to tag some libs needed external programs, special features or significant memory usage in order to be able to build documentation on more machines. Make DOC2TEX_EXAMPLE_EXCLUSIONS a make variable, so that this setting can also be overridden at make invocation time.
  • Property mode set to 100644
File size: 12.1 KB
Line 
1####################################################################
2###
3### Makefile for Singular documentation
4#####################################################################
5SHELL=/bin/sh
6
7####################################################################
8##
9## Configuration
10##
11SINGUNAME       = @SINGUNAME@
12S_VERSION       = $${SINGULAR_VERSION-@SINGULAR_VERSION@}
13
14PYOBECT_TEX =
15#PYOBECT_TEX = pyobject.tex
16
17
18## directory where info files are installed
19prefix          = @prefix@
20infodir         = ${prefix}/info
21bindir          = @bindir@
22htmldir         = ${prefix}/html
23exdir           = ${prefix}/examples
24
25localdir        = /usr/local
26install_prefix  = ${localdir}/Singular/${S_VERSION}
27install_infodir = ${install_prefix}/info
28install_htmldir = ${install_prefix}/html
29install_docdir  = ${install_prefix}/doc
30install_exdir   = ${install_prefix}/examples
31
32# directory where files for ftp site go
33ftpdir          = /tmp
34
35##
36## needed programs
37##
38@SET_MAKE@
39LN_S            = @LN_S@
40INSTALL         = ../install-sh -c
41INSTALL_PROGRAM = ${INSTALL}
42INSTALL_DATA    = ${INSTALL} -m 644
43MKINSTALLDIRS   = ../mkinstalldirs
44GZIP            = @MYGZIP@
45UUDECODE        = @UUDECODE@
46
47PERL            = @PERL@
48TEX             = tex
49MAKEINFO        = @MAKEINFO@ --force
50TEXI2PDF        = @TEXI2PDF@
51TEXINDEX        = @TEXINDEX@
52# use our local texi2html
53TEXI2HTML       = ./texi2html
54DVIPS           = dvips
55
56VERBOSE         = 1 # override this with make VERBOSE=2
57
58# d2t stuff
59SINGULAR        = @SINGULAR@
60SINGULAR_LIB_DIR= ../Singular/LIB
61ifeq ($(SINGUNAME),"ix86-Win")
62LIBPARSE        = ${bindir}/libparse.exe
63else
64LIBPARSE        = ${bindir}/libparse
65endif
66DOC_SUBDIR      = ./d2t_singular
67EX_SUBDIR       = ./examples
68CHKSUM_DB       = ${DOC_SUBDIR}/chksum
69DOC2TEX_EXAMPLE_EXCLUSIONS = @DOC2TEX_EXAMPLE_EXCLUSIONS@
70DOC2TEX         = ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
71                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
72                  -exdir ${EX_SUBDIR} ${DOC2TEX_EXAMPLE_EXCLUSIONS}
73TAG             =
74PL2DOC          = ${PERL} ./pl2doc.pl ${TAG} -db ${CHKSUM_DB}
75
76# t2h stuff
77TMP_DIR         = @TMP_DIR@
78HTML_SUBDIR     = html
79TEXI2HTML_INIT  = t2h_singular.init
80ifeq ($(VERBOSE),0)
81T2H_VERBOSE     =
82else
83T2H_VERBOSE     = -Verbose
84endif
85TEXI2HTML_OPTS  = -init_file ${TEXI2HTML_INIT} @TEXI2HTML_OPTS@ \
86                  -short_ext -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \
87                  ${T2H_VERBOSE}
88HTML_MANUAL_PREFIX = sing
89HTML_TUTOR_PREFIX  = tut
90HTML_MANUAL_TOP    = index.htm
91HTML_TUTOR_TOP     = tutor.htm
92##
93## End configuration dependend stuff
94#################################################################
95
96###########################################################
97# File sets
98#
99STANDALONE_TEXI_FILES   = COPYING.texi INSTALL_unix.texi NEWS.texi \
100                          README_download.texi README_ftp.texi \
101                          README_distribution.texi README_src.texi \
102                          INSTALL_win.texi
103
104DOC2TEX_FILES   = decodegb.tex \
105                examples.tex general.tex ti_ip.tex math.tex reference.tex \
106                start.tex types.tex pdata.tex tricks.tex platform.tex \
107                plural.tex letterplace.tex plulibs.tex sca.tex ${PYOBJECT_TEX}
108
109MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
110
111TUTOR_FILES     = \
112                tutor.tex examples.tex start.tex COPYING.texi
113
114IMAGES_UU       := $(wildcard images/*.uu)
115IMAGES     := $(IMAGES_UU:images/%.uu=%)
116IMAGES_SRC := $(IMAGES:%=images/%)
117IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
118
119# prepend bindir to path so that programs from there are taken first
120export PATH := "${bindir}:${PATH}"
121
122###########################################################
123# top targets
124#
125
126.PHONY: info dvi ps html
127
128# default target
129all: info dvi html singular.idx
130
131# info stuff
132info: singular.hlp
133
134singular.hlp: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex
135        - ${MAKEINFO} --no-split singular.tex
136
137# dvi stuff
138dvi: manual.dvi usercard.dvi
139
140singular.dvi: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex
141        tex singular.tex
142        texindex singular.cp
143        tex singular.tex
144        texindex singular.cp
145        tex singular.tex
146
147singular.pdf: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex
148        ${TEXI2PDF} singular.tex
149
150manual.dvi: ${MANUAL_FILES} manual.tex s-plural.tex s-plulibs.tex
151        tex manual.tex
152        texindex manual.cp
153        tex manual.tex
154        texindex manual.cp
155        tex manual.tex
156
157tutor.dvi: ${TUTOR_FILES}
158        tex tutor.tex
159        tex tutor.tex
160        tex tutor.tex
161
162tutor.pdf: ${TUTOR_FILES}
163        ${TEXI2PDF} tutor.tex
164
165usercard.dvi: usercard.tex singcard.tex
166        ${TEX} $<
167
168s-plural.tex: plural.tex
169        sed -e "s/BR_PLURAL_BR/(plural)/g" <plural.tex >s-plural.tex
170
171s-plulibs.tex: plulibs.tex
172        sed -e "s/BR_PLURAL_BR/(plural)/g" <plulibs.tex >s-plulibs.tex
173
174# postscript stuff
175ps: dvi manual.ps usercard.ps
176
177usercard.ps: usercard.dvi
178        ${DVIPS} -t landscape -t a4 $< -o $@
179
180%.ps: %.dvi
181        ${DVIPS} $< -o $@
182
183###########################################################
184# texinfo targets
185#
186manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
187        +${DOC2TEX} -no_fun -o manual.tex singular.doc
188
189singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES)
190        +${DOC2TEX} -o singular.tex singular.doc
191
192#pattern rule for tex files
193%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
194        +${DOC2TEX} -o $@ -no_ex $<
195
196%.tex: %.doc doc2tex.pl ${SINGULAR}
197        +${DOC2TEX} -o $@ $<
198
199# pattern rules for lib docus
200${DOC_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
201        test -d ${DOC_SUBDIR} || mkdir ${DOC_SUBDIR}
202        ${LIBPARSE} -i $< > $@
203
204%_noFun.doc : %.pl pl2doc.pl
205        ${PL2DOC}  -no_fun -o $@  $<
206
207%.doc : %.pl pl2doc.pl
208        ${PL2DOC} -o $@ $<
209
210# do not delete intermediate .pl and .doc files
211.PRECIOUS: %.doc %_noFun.doc ${DOC_SUBDIR}/%_lib.pl
212
213# index file for help
214singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
215        ${PERL} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
216
217###########################################################
218# stand-alone targest
219#
220
221STANDALONE_TXT_FILES := $(STANDALONE_TEXI_FILES:.texi=.txt)
222STANDALONE_HTML_FILES := $(STANDALONE_TEXI_FILES:.texi=.html)
223STANDALONE_FILES      := $(STANDALONE_TEXI_FILES:.texi=)
224
225ifeq ($(SINGUNAME),@SINGUNAME@)
226UNAME_OPT = -D UNAME
227endif
228
229# targets which produce stand-alone documents
230%.${SINGUNAME}.txt : %.texi
231        ${MAKEINFO} $(UNAME_OPT) --no-header --paragraph-indent none  -o $@ $<
232
233%.txt :  %.texi
234        ${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
235
236%.${SINGUNAME}.html : %.texi
237        ${PERL} ${TEXI2HTML} $(UNAME_OPT) -init_file t2h_standalone.init -split none -out_file $@ $<
238
239%.html : %.texi
240        ${PERL} ${TEXI2HTML} -init_file t2h_standalone.init -split none -out_file $@ $<
241
242% : %.txt
243        cp $< $@
244
245standalone: standalone-txt standalone-html ${STANDALONE_FILES}
246
247standalone-html: ${STANDALONE_HTML_FILES}
248standalone-txt:  ${STANDALONE_TXT_FILES}
249
250WWW_DIR = /singular/www/2-0/
251FTP_DIR = /ftp/pub/Math/Singular/Development
252
253install-standalone: standalone
254        cp INSTALL_unix.html COPYING.html INSTALL_win.html ${WWW_DIR}
255        cp COPYING COPYING.html ${FTP_DIR}
256        cp INSTALL_unix INSTALL_unix.html ${FTP_DIR}
257        cp INSTALL_win INSTALL_win.html ${FTP_DIR}
258        cp README_ftp.html ${FTP_DIR}/README.html
259        cp README_ftp ${FTP_DIR}/README
260        cp NEWS.html NEWS ${FTP_DIR}
261        cp NEWS.html ${WWW_DIR}
262        - chmod g+w ${FTP_DIR}/*
263
264
265
266###########################################################
267# html targets
268#
269html: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES)
270${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex s-plural.tex
271        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
272        -top_file ${HTML_MANUAL_TOP} singular.tex
273
274# html stuff
275html_tutor: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
276${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
277        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
278        -top_file ${HTML_TUTOR_TOP} tutor.tex
279
280${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
281
282${TMP_DIR}:
283        ${MKINSTALLDIRS} ${TMP_DIR}
284
285# pattern rules for images - but not everybody has gnu-uudecode
286images/%.gif : images/%.gif.uu
287        cd images; ${UUDECODE} ../$< ;cd ..
288
289images/%.jpg : images/%.jpg.uu
290        cd images; ${UUDECODE} ../$< ;cd ..
291
292images/%.xbm : images/%.xbm.uu
293        cd images; ${UUDECODE} ../$< ;cd ..
294
295${IMAGES_HTML} : ${IMAGES_SRC}
296        test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
297        cp ${IMAGES_SRC} ${HTML_SUBDIR}
298
299###########################################################
300# misc targets
301#
302install: singular.hlp html singular.idx standalone
303        ${MKINSTALLDIRS} ${infodir}
304        ${INSTALL_DATA} singular.hlp ${infodir}
305        test -r ${htmldir} || ln -s `pwd`/${HTML_SUBDIR} ${htmldir}
306        test -r ${exdir} || ln -s `pwd`/${EX_SUBDIR} ${exdir}
307
308install_all: install
309
310uninstall:
311        rm -f ${infodir}/singular.hlp
312        - rmdir ${infodir}
313
314#stupid HP's don't allow copy with many arguments
315install-sharedist: singular.hlp html singular.idx \
316                   ${STANDALONE_HTML_FILES} ${STANDALONE_TXT_FILES}
317        ${MKINSTALLDIRS} ${install_prefix}
318        ${MKINSTALLDIRS} ${install_infodir}
319        ${INSTALL_DATA} singular.hlp ${install_infodir}
320        chmod -R +rX ${install_infodir}
321        ${MKINSTALLDIRS} ${install_htmldir}
322        cp ${HTML_SUBDIR}/*.htm ${install_htmldir}
323        cp ${HTML_SUBDIR}/*.gif ${install_htmldir}
324        -cp ${HTML_SUBDIR}/*.png ${install_htmldir}
325        cp ${HTML_SUBDIR}/*.jpg ${install_htmldir}
326        chmod -R +rX ${install_htmldir}
327        ${MKINSTALLDIRS} ${install_docdir}
328        ${INSTALL_DATA} singular.idx ${install_docdir}
329        ${INSTALL_DATA} ../GPL2 ${install_prefix}/GPL2
330        ${INSTALL_DATA} ../GPL3 ${install_prefix}/GPL3
331        ${INSTALL_DATA} COPYING.txt ${install_prefix}/COPYING
332        ${INSTALL_DATA} COPYING.html ${install_prefix}
333        ${INSTALL_DATA} NEWS.txt ${install_prefix}/NEWS
334        ${INSTALL_DATA} NEWS.html ${install_prefix}
335        ${INSTALL_DATA} README_distribution.txt ${install_prefix}/README
336        ${INSTALL_DATA} README_distribution.html ${install_prefix}/README.html
337        chmod -R +rX ${install_docdir}
338        chmod -R +rX ${install_prefix}
339        ${MKINSTALLDIRS} ${install_exdir}
340        cp -R examples ${install_prefix}
341        /bin/rm -f ${install_prefix}/examples/[A-Z]*.res
342        /bin/rm -f ${install_prefix}/examples/*.res
343        /bin/rm -f ${install_prefix}/examples/[A-Z]*.inc
344        /bin/rm -f ${install_prefix}/examples/*.inc
345        chmod -R +rX ${install_prefix}/
346
347# use 'make INSTALL_unix.olaf.txt INSTALL_unix.olaf.html SINGUNAME=olaf'
348# to generate these files for uname 'olaf'
349install-bindist: INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
350        ${MKINSTALLDIRS} ${install_prefix}
351        ${INSTALL_DATA} INSTALL_unix.${SINGUNAME}.txt ${install_prefix}/INSTALL
352        ${INSTALL_DATA} INSTALL_unix.${SINGUNAME}.html ${install_prefix}/INSTALL.html
353
354install-ftp: ${STANDALONE_HTML_FILES} ${STANDALONE_TXT_FILES}
355        ${INSTALL_DATA} NEWS.txt ${ftpdir}/NEWS
356        ${INSTALL_DATA} NEWS.html ${ftpdir}
357        ${INSTALL_DATA} COPYING.txt ${ftpdir}/COPYING
358        ${INSTALL_DATA} COPYING.html ${ftpdir}
359        ${INSTALL_DATA} INSTALL_unix.txt ${ftpdir}/INSTALL_unix
360        ${INSTALL_DATA} INSTALL_unix.html ${ftpdir}
361        ${INSTALL_DATA} README_ftp.txt ${ftpdir}/README
362        ${INSTALL_DATA} README_ftp.html ${ftpdir}/README.html
363
364texi2html = $(TEXI2HTML:%.pl=%)
365
366lib2doc.tar.gz:
367        rm -rf lib2doc lib2doc.tar.gz
368        mkdir lib2doc
369        cp Makefile.lib2doc lib2doc/Makefile
370        ${MAKEINFO} --no-header --paragraph-indent none -o lib2doc/README lib2doc.texi
371        cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc
372        tar cf lib2doc.tar lib2doc
373        ${GZIP} lib2doc.tar
374
375clean: mostlyclean
376        /bin/rm -rf singular.tex manual.tex ${DOC_SUBDIR} ${EX_SUBDIR}
377
378mostlyclean:
379        /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt
380        /bin/rm -f save_i test.ascii test.mp
381        /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps
382        /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp
383        /bin/rm -f *.tps *.vr *.vrs *.dvi *.ps
384        /bin/rm -f s-plural.tex
385        /bin/rm -f singular.hlp manual.hlp  ${DOC2TEX_FILES} singular.idx
386        /bin/rm -f manual.hlp
387        /bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}
388        /bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES}
389        /bin/rm -f INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
390
391distclean: clean
392        /bin/rm -f Makefile
393        /bin/rm -rf ${HTML_SUBDIR} ../html ../examples
394
395maintainer-clean: distclean
396
397depend:
398        @echo "No make depend available!"
399
400${SINGULAR}:
401#       cd ..; ${MAKE} ${SINGULAR}
402
403Makefile: Makefile.in
404        cd ..;  CONFIG_FILES="doc/Makefile" CONFIG_HEADERS= ./config.status
405
406html-done: ${MANUAL_FILES}
Note: See TracBrowser for help on using the repository browser.