source: git/doc/Makefile-docbuild.in @ 4c486e

fieker-DuValspielwiese
Last change on this file since 4c486e was 1362e61, checked in by Hans Schoenemann <hannes@…>, 2 years ago
Merge pull request #1108 from orlitzky/rename-info-file Rename singular.hlp to singular.info
  • Property mode set to 100644
File size: 8.1 KB
Line 
1####################################################################
2###
3### Makefile for Singular documentation
4#####################################################################
5SHELL=/bin/sh
6
7####################################################################
8##
9## Configuration
10##
11SINGUNAME       = spielwiese
12
13top_builddir    = @top_builddir@
14top_srcdir      = @top_srcdir@
15bindir          = ${top_builddir}/Singular
16EXEEXT          = @EXEEXT@
17
18##
19## needed programs
20##
21MKINSTALLDIRS   = mkdir -p
22UUDECODE        = uudecode
23
24PERL            = perl
25TEX             = tex
26MAKEINFO        = @MAKEINFO@ --force
27TEXI2PDF        = @TEXI2PDF@
28TEXINDEX        = @TEXINDEX@
29# use our local texi2html
30TEXI2HTML       = ./texi2html
31DVIPS           = @DVIPS@
32
33VERBOSE         = 1 # override this with make VERBOSE=2
34
35# d2t stuff
36SINGULAR        = ${top_builddir}/Singular/Singular
37SINGULAR_LIB_DIR= ${top_srcdir}/Singular/LIB
38# from Singular/Makefile.am, extended by dynmodules stuff:
39TESTS_ENVIRONMENT = unset DISPLAY SINGULAR_EXECUTABLE && SINGULARPATH="$$(for d in ${top_builddir}/Singular/dyn_modules/*/.libs; do printf $$d:; done)" PATH="${top_builddir}/IntegerProgramming:$$PATH"
40LIBPARSE        = ${top_builddir}/Singular/libparse${EXEEXT}
41DOC_SUBDIR      = ./d2t_singular
42EX_SUBDIR       = ./examples
43CHKSUM_DB       = ${DOC_SUBDIR}/chksum
44# which tags to avoid:
45DOC2TEX_EXAMPLE_EXCLUSIONS = @DOC2TEX_EXAMPLE_EXCLUSIONS@ -exclude crash
46# which tags to avoid:
47DOC2TEX         = ${TESTS_ENVIRONMENT} ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
48                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make "${MAKE} -f Makefile-docbuild" \
49                  -exdir ${EX_SUBDIR} ${DOC2TEX_EXAMPLE_EXCLUSIONS}
50
51DOC2TEX_M        = ${TESTS_ENVIRONMENT} ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
52                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make "${MAKE} -f Makefile-docbuild" \
53                  -exdir ${EX_SUBDIR}
54
55PL2DOC          = ${PERL} ./pl2doc.pl ${TAG} -db ${CHKSUM_DB}
56PL2DOC_M        = ${PERL} ./pl2doc.pl ${TAG} -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 NEWS.texi  lib2doc.texi
82
83DOC2TEX_FILES   = cones.tex countedref.tex decodegb.tex \
84                examples.tex general.tex ti_ip.tex math.tex reference.tex \
85                start.tex types.tex pdata.tex tricks.tex platform.tex \
86                plural.tex letterplace.tex plulibs.tex sca.tex pyobject.tex
87
88MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
89
90TUTOR_FILES     = \
91                tutor.tex examples.tex start.tex COPYING.texi
92
93IMAGES_UU       := $(wildcard images/*.uu)
94IMAGES     := $(IMAGES_UU:images/%.uu=%)
95IMAGES_SRC := $(IMAGES:%=images/%)
96IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
97
98# prepend bindir to path so that programs from there are taken first.
99# prepending the .libs directories is needed on Cygwin for finding the .dll files
100export PATH := "${bindir}:${top_builddir}/libpolys/polys/.libs:${top_builddir}/Singular/.libs:${top_builddir}/omalloc/.libs:${top_builddir}/factory/.libs:${top_builddir}/resources/.libs:${PATH}"
101
102###########################################################
103# top targets
104#
105
106.PHONY: info dvi ps html
107
108# default target
109all: info dvi html singular.idx
110
111# info stuff
112info: singular.info
113
114singular.info: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
115        - ${MAKEINFO} --no-split singular.tex
116
117# dvi stuff
118dvi: manual.dvi usercard.dvi
119
120singular.dvi: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
121        tex singular.tex
122        texindex singular.cp
123        tex singular.tex
124        texindex singular.cp
125        tex singular.tex
126
127singular.pdf: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
128        ${TEXI2PDF} singular.tex
129
130manual.dvi: ${MANUAL_FILES} manual.tex s-plural.tex s-plulibs.tex  s-letterplace.tex
131        tex manual.tex
132        texindex manual.cp
133        tex manual.tex
134        texindex manual.cp
135        tex manual.tex
136
137tutor.dvi: ${TUTOR_FILES}
138        tex tutor.tex
139        tex tutor.tex
140        tex tutor.tex
141
142tutor.pdf: ${TUTOR_FILES}
143        ${TEXI2PDF} tutor.tex
144
145usercard.dvi: usercard.tex singcard.tex
146        ${TEX} $<
147
148s-plural.tex: plural.tex
149        sed -e "s/BR_PLURAL_BR/(plural)/g" <plural.tex >s-plural.tex
150
151s-plulibs.tex: plulibs.tex
152        sed -e "s/BR_PLURAL_BR/(plural)/g" <plulibs.tex >s-plulibs.tex
153
154s-letterplace.tex: letterplace.tex
155        sed -e "s/BR_LETTERPLACE_BR/(letterplace)/g" <letterplace.tex >s-letterplace.tex
156
157# postscript stuff
158ps: dvi manual.ps usercard.ps
159
160usercard.ps: usercard.dvi
161        ${DVIPS} -t landscape -t a4 $< -o $@
162
163%.ps: %.dvi
164        ${DVIPS} $< -o $@
165
166###########################################################
167# texinfo targets
168#
169manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
170        +${DOC2TEX_M} -no_fun -o manual.tex singular.doc
171
172singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES)
173        +${DOC2TEX} -o singular.tex singular.doc
174
175#pattern rule for tex files
176%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
177        +${DOC2TEX_M} -o $@ -no_ex $<
178
179%.tex: %.doc doc2tex.pl ${SINGULAR}
180        +${DOC2TEX} -o $@ $<
181
182# pattern rules for lib docus
183${DOC_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
184        test -d ${DOC_SUBDIR} || mkdir ${DOC_SUBDIR}
185        ${LIBPARSE} -i $< > $@
186
187%_noFun.doc : %.pl pl2doc.pl
188        export PERLLIB=. PERL5LIB=.; ${PL2DOC_M}  -no_fun -o $@  $<
189
190%.doc : %.pl pl2doc.pl
191        export PERLLIB=. PERL5LIB=.; ${PL2DOC} -o $@ $<
192
193# do not delete intermediate .pl and .doc files
194.PRECIOUS: %.doc %_noFun.doc ${DOC_SUBDIR}/%_lib.pl
195
196# index file for help
197singular.idx: singular.info ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
198        export PERLLIB=. PERL5LIB=.;${PERL} doc2idx.pl singular.info ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
199
200###########################################################
201
202ifeq ($(SINGUNAME),@SINGUNAME@)
203UNAME_OPT = -D UNAME
204endif
205
206# targets which produce stand-alone documents
207%.${SINGUNAME}.txt : %.texi
208        ${MAKEINFO} $(UNAME_OPT) --no-header --paragraph-indent none  -o $@ $<
209
210%.txt :  %.texi
211        ${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
212
213%.${SINGUNAME}.html : %.texi
214        export PERLLIB=. PERL5LIB=.;${PERL} ${TEXI2HTML} $(UNAME_OPT) -init_file t2h_standalone.init -split none -out_file $@ $<
215
216%.html : %.texi
217        export PERLLIB=. PERL5LIB=.;${PERL} ${TEXI2HTML} -init_file t2h_standalone.init -split none -out_file $@ $<
218
219% : %.txt
220        cp $< $@
221
222###########################################################
223# html targets
224#
225html: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES)
226${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex s-plural.tex s-letterplace.tex
227        export PERLLIB=. PERL5LIB=.;${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
228        -top_file ${HTML_MANUAL_TOP} singular.tex
229
230# html stuff
231html_tutor: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
232${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
233        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
234        -top_file ${HTML_TUTOR_TOP} tutor.tex
235
236${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
237
238${TMP_DIR}:
239        ${MKINSTALLDIRS} ${TMP_DIR}
240
241# pattern rules for images - but not everybody has gnu-uudecode
242images/%.gif : images/%.gif.uu
243        cd images; ${UUDECODE} ../$< ;cd ..
244
245images/%.jpg : images/%.jpg.uu
246        cd images; ${UUDECODE} ../$< ;cd ..
247
248images/%.xbm : images/%.xbm.uu
249        cd images; ${UUDECODE} ../$< ;cd ..
250
251${IMAGES_HTML} : ${IMAGES_SRC}
252        test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
253        cp ${IMAGES_SRC} ${HTML_SUBDIR}
254
255###########################################################
256# misc targets
257#
258texi2html = $(TEXI2HTML:%.pl=%)
259
260depend:
261        @echo "No make depend available!"
262
263${SINGULAR}:
264#       cd ..; ${MAKE} ${SINGULAR}
265
266html-done: ${MANUAL_FILES}
Note: See TracBrowser for help on using the repository browser.