source: git/doc/Makefile.in @ 341696

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