source: git/doc/Makefile.bsp @ 1edbe2f

fieker-DuValspielwiese
Last change on this file since 1edbe2f was 1edbe2f, checked in by Hans Schoenemann <hannes@…>, 5 years ago
format
  • Property mode set to 100644
File size: 8.2 KB
Line 
1####################################################################
2###
3### Makefile for Singular documentation
4#####################################################################
5SHELL=/bin/sh
6
7####################################################################
8##
9## Configuration
10##
11SINGUNAME       = spielwiese
12
13bindir          = @bindir@
14
15##
16## needed programs
17##
18MKINSTALLDIRS   = mkdir -p
19UUDECODE        = uudecode
20
21PERL            = perl
22TEX             = tex
23MAKEINFO        = makeinfo --force
24TEXI2PDF        = @TEXI2PDF@
25TEXINDEX        = @TEXINDEX@
26# use our local texi2html
27TEXI2HTML       = ./texi2html
28DVIPS           = dvips
29
30VERBOSE         = 1 # override this with make VERBOSE=2
31
32# d2t stuff
33SINGULAR        = /scratch/hannes/billbo-sw/Singular/Singular
34SINGULAR_LIB_DIR= ../Singular/LIB
35ifeq ($(SINGUNAME),"ix86-Win")
36LIBPARSE        = ${bindir}/libparse.exe
37else
38LIBPARSE        = ./libparse
39endif
40DOC_SUBDIR      = ./d2t_singular
41EX_SUBDIR       = ./examples
42CHKSUM_DB       = ${DOC_SUBDIR}/chksum
43# which tags to avoid:
44DOC2TEX_EXAMPLE_EXCLUSIONS = -exclude polymake
45# which tags to avoid:
46TAG             = polymake
47DOC2TEX         = ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
48                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
49                  -exdir ${EX_SUBDIR} ${DOC2TEX_EXAMPLE_EXCLUSIONS}
50
51DOC2TEX_M        = ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
52                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
53                  -exdir ${EX_SUBDIR}
54
55PL2DOC          = ${PERL} ./pl2doc.pl ${TAG} -db ${CHKSUM_DB}
56PL2DOC_M        = ${PERL} ./pl2doc.pl -db ${CHKSUM_DB}
57
58# t2h stuff
59TMP_DIR         = tmp
60HTML_SUBDIR     = html
61TEXI2HTML_INIT  = t2h_singular.init
62ifeq ($(VERBOSE),0)
63T2H_VERBOSE     =
64else
65T2H_VERBOSE     = -Verbose
66endif
67TEXI2HTML_OPTS  = -init_file ${TEXI2HTML_INIT} -l2h \
68                  -short_ext -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \
69                  ${T2H_VERBOSE}
70HTML_MANUAL_PREFIX = sing
71HTML_TUTOR_PREFIX  = tut
72HTML_MANUAL_TOP    = index.htm
73HTML_TUTOR_TOP     = tutor.htm
74##
75## End configuration dependend stuff
76#################################################################
77
78###########################################################
79# File sets
80#
81STANDALONE_TEXI_FILES   = COPYING.texi INSTALL_unix.texi NEWS.texi \
82                          README_download.texi README_ftp.texi \
83                          README_distribution.texi README_src.texi \
84                          INSTALL_win.texi
85
86DOC2TEX_FILES   = cones.tex countedref.tex decodegb.tex \
87                examples.tex general.tex ti_ip.tex math.tex reference.tex \
88                start.tex types.tex pdata.tex tricks.tex platform.tex \
89                plural.tex letterplace.tex plulibs.tex sca.tex pyobject.tex
90
91MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
92
93TUTOR_FILES     = \
94                tutor.tex examples.tex start.tex COPYING.texi
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 s-plural.tex s-plulibs.tex s-letterplace.tex
117        - ${MAKEINFO} --no-split singular.tex
118
119# dvi stuff
120dvi: manual.dvi usercard.dvi
121
122singular.dvi: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
123        tex singular.tex
124        texindex singular.cp
125        tex singular.tex
126        texindex singular.cp
127        tex singular.tex
128
129singular.pdf: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
130        ${TEXI2PDF} singular.tex
131
132manual.dvi: ${MANUAL_FILES} manual.tex s-plural.tex s-plulibs.tex  s-letterplace.tex
133        tex manual.tex
134        texindex manual.cp
135        tex manual.tex
136        texindex manual.cp
137        tex manual.tex
138
139tutor.dvi: ${TUTOR_FILES}
140        tex tutor.tex
141        tex tutor.tex
142        tex tutor.tex
143
144tutor.pdf: ${TUTOR_FILES}
145        ${TEXI2PDF} tutor.tex
146
147usercard.dvi: usercard.tex singcard.tex
148        ${TEX} $<
149
150s-plural.tex: plural.tex
151        sed -e "s/BR_PLURAL_BR/(plural)/g" <plural.tex >s-plural.tex
152
153s-plulibs.tex: plulibs.tex
154        sed -e "s/BR_PLURAL_BR/(plural)/g" <plulibs.tex >s-plulibs.tex
155
156s-letterplace.tex: letterplace.tex
157        sed -e "s/BR_LETTERPLACE_BR/(letterplace)/g" <letterplace.tex >s-letterplace.tex
158
159# postscript stuff
160ps: dvi manual.ps usercard.ps
161
162usercard.ps: usercard.dvi
163        ${DVIPS} -t landscape -t a4 $< -o $@
164
165%.ps: %.dvi
166        ${DVIPS} $< -o $@
167
168###########################################################
169# texinfo targets
170#
171manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
172        +${DOC2TEX_M} -no_fun -o manual.tex singular.doc
173
174singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES)
175        +${DOC2TEX} -o singular.tex singular.doc
176
177#pattern rule for tex files
178%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
179        +${DOC2TEX_M} -o $@ -no_ex $<
180
181%.tex: %.doc doc2tex.pl ${SINGULAR}
182        +${DOC2TEX} -o $@ $<
183
184# pattern rules for lib docus
185${DOC_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
186        test -d ${DOC_SUBDIR} || mkdir ${DOC_SUBDIR}
187        ${LIBPARSE} -i $< > $@
188
189%_noFun.doc : %.pl pl2doc.pl
190        ${PL2DOC_M}  -no_fun -o $@  $<
191
192%.doc : %.pl pl2doc.pl
193        ${PL2DOC} -o $@ $<
194
195# do not delete intermediate .pl and .doc files
196.PRECIOUS: %.doc %_noFun.doc ${DOC_SUBDIR}/%_lib.pl
197
198# index file for help
199singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
200        ${PERL} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
201
202###########################################################
203
204ifeq ($(SINGUNAME),@SINGUNAME@)
205UNAME_OPT = -D UNAME
206endif
207
208# targets which produce stand-alone documents
209%.${SINGUNAME}.txt : %.texi
210        ${MAKEINFO} $(UNAME_OPT) --no-header --paragraph-indent none  -o $@ $<
211
212%.txt :  %.texi
213        ${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
214
215%.${SINGUNAME}.html : %.texi
216        ${PERL} ${TEXI2HTML} $(UNAME_OPT) -init_file t2h_standalone.init -split none -out_file $@ $<
217
218%.html : %.texi
219        ${PERL} ${TEXI2HTML} -init_file t2h_standalone.init -split none -out_file $@ $<
220
221% : %.txt
222        cp $< $@
223
224###########################################################
225# html targets
226#
227html: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES)
228${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex s-plural.tex s-letterplace.tex
229        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
230        -top_file ${HTML_MANUAL_TOP} singular.tex
231
232# html stuff
233html_tutor: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
234${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
235        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
236        -top_file ${HTML_TUTOR_TOP} tutor.tex
237
238${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
239
240${TMP_DIR}:
241        ${MKINSTALLDIRS} ${TMP_DIR}
242
243# pattern rules for images - but not everybody has gnu-uudecode
244images/%.gif : images/%.gif.uu
245        cd images; ${UUDECODE} ../$< ;cd ..
246
247images/%.jpg : images/%.jpg.uu
248        cd images; ${UUDECODE} ../$< ;cd ..
249
250images/%.xbm : images/%.xbm.uu
251        cd images; ${UUDECODE} ../$< ;cd ..
252
253${IMAGES_HTML} : ${IMAGES_SRC}
254        test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
255        cp ${IMAGES_SRC} ${HTML_SUBDIR}
256
257###########################################################
258# misc targets
259#
260texi2html = $(TEXI2HTML:%.pl=%)
261
262clean: mostlyclean
263        /bin/rm -rf singular.tex manual.tex ${DOC_SUBDIR} ${EX_SUBDIR}
264
265mostlyclean:
266        /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt
267        /bin/rm -f save_i test.ascii test.mp
268        /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps
269        /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp
270        /bin/rm -f *.tps *.vr *.vrs *.dvi *.ps
271        /bin/rm -f s-plural.tex s-plulibs.tex s-letterplace.tex
272        /bin/rm -f singular.hlp manual.hlp  ${DOC2TEX_FILES} singular.idx
273        /bin/rm -f manual.hlp
274        /bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}
275        /bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES}
276        /bin/rm -f INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
277
278distclean: clean
279        /bin/rm -f Makefile
280        /bin/rm -rf ${HTML_SUBDIR} ../html ../examples
281
282maintainer-clean: distclean
283
284depend:
285        @echo "No make depend available!"
286
287${SINGULAR}:
288#       cd ..; ${MAKE} ${SINGULAR}
289
290html-done: ${MANUAL_FILES}
Note: See TracBrowser for help on using the repository browser.