source: git/doc/Makefile.in @ 6ce030f

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