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

spielwiese
Last change on this file since 6ce030f was 6ce030f, checked in by Oleksandr Motsak <motsak@…>, 12 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
RevLine 
[b2650f]1####################################################################
[3de58c]2###
3### Makefile for Singular documentation
[d30e2a8]4#####################################################################
5SHELL=/bin/sh
6
7####################################################################
8##
9## Configuration
10##
[685b4c]11SINGUNAME       = @SINGUNAME@
12S_VERSION       = $${SINGULAR_VERSION-@SINGULAR_VERSION@}
[d30e2a8]13
[959af92]14PYOBECT_TEX =
15#PYOBECT_TEX = pyobject.tex
16
17
[d30e2a8]18## directory where info files are installed
[3de58c]19prefix          = @prefix@
20infodir         = ${prefix}/info
21bindir          = @bindir@
[460c1e1]22htmldir         = ${prefix}/html
[c04b94]23exdir           = ${prefix}/examples
[685b4c]24
25localdir        = /usr/local
26install_prefix  = ${localdir}/Singular/${S_VERSION}
[4b72f6]27install_infodir = ${install_prefix}/info
28install_htmldir = ${install_prefix}/html
29install_docdir  = ${install_prefix}/doc
[c04b94]30install_exdir   = ${install_prefix}/examples
[d30e2a8]31
[a94090]32# directory where files for ftp site go
[3de58c]33ftpdir          = /tmp
[a94090]34
[d30e2a8]35##
36## needed programs
37##
38@SET_MAKE@
[3de58c]39LN_S            = @LN_S@
40INSTALL         = ../install-sh -c
41INSTALL_PROGRAM = ${INSTALL}
42INSTALL_DATA    = ${INSTALL} -m 644
[d30e2a8]43MKINSTALLDIRS   = ../mkinstalldirs
[3de58c]44GZIP            = @MYGZIP@
45UUDECODE        = @UUDECODE@
46
47PERL            = @PERL@
48TEX             = tex
49MAKEINFO        = @MAKEINFO@ --force
[175c56]50TEXI2PDF        = @TEXI2PDF@
[3de58c]51TEXINDEX        = @TEXINDEX@
[a0fdca8]52# use our local texi2html
[3de58c]53TEXI2HTML       = ./texi2html
54DVIPS           = dvips
[d30e2a8]55
[354f3b]56VERBOSE         = 1 # override this with make VERBOSE=2
[685b4c]57
[f36635]58# d2t stuff
[3de58c]59SINGULAR        = @SINGULAR@
[dcc635]60SINGULAR_LIB_DIR= ../Singular/LIB
[0c7e78]61ifeq ($(SINGUNAME),"ix86-Win")
62LIBPARSE        = ${bindir}/libparse.exe
63else
[3de58c]64LIBPARSE        = ${bindir}/libparse
[0c7e78]65endif
[c04b94]66DOC_SUBDIR      = ./d2t_singular
67EX_SUBDIR       = ./examples
68CHKSUM_DB       = ${DOC_SUBDIR}/chksum
[3de58c]69DOC2TEX         = ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
[c04b94]70                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
[57de80]71                  -exdir ${EX_SUBDIR} @DOC2TEX_EXAMPLE_EXCLUSIONS@
[ed0124e]72PL2DOC          = ${PERL} ./pl2doc.pl -db ${CHKSUM_DB}
[dcc635]73
74# t2h stuff
[f36635]75TMP_DIR         = @TMP_DIR@
[dcc635]76HTML_SUBDIR     = html
77TEXI2HTML_INIT  = t2h_singular.init
[0a2ba89]78ifeq ($(VERBOSE),0)
[3de58c]79T2H_VERBOSE     =
[0a2ba89]80else
[3cc667]81T2H_VERBOSE     = -Verbose
[0a2ba89]82endif
[dcc635]83TEXI2HTML_OPTS  = -init_file ${TEXI2HTML_INIT} @TEXI2HTML_OPTS@ \
[d0313d]84                  -short_ext -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \
[0a2ba89]85                  ${T2H_VERBOSE}
[dcc635]86HTML_MANUAL_PREFIX = sing
87HTML_TUTOR_PREFIX  = tut
88HTML_MANUAL_TOP    = index.htm
89HTML_TUTOR_TOP     = tutor.htm
[d30e2a8]90##
91## End configuration dependend stuff
92#################################################################
93
[65a2bd]94###########################################################
95# File sets
96#
[a94090]97STANDALONE_TEXI_FILES   = COPYING.texi INSTALL_unix.texi NEWS.texi \
[c84d678]98                          README_download.texi README_ftp.texi \
[974752]99                          README_distribution.texi README_src.texi \
[3de58c]100                          INSTALL_win.texi
[e3663f1]101
[cc7519]102DOC2TEX_FILES   = decodegb.tex \
[d462b24]103                examples.tex general.tex ti_ip.tex math.tex reference.tex \
104                start.tex types.tex pdata.tex tricks.tex platform.tex \
[959af92]105                plural.tex letterplace.tex plulibs.tex sca.tex ${PYOBJECT_TEX}
[213882]106
[5a953a]107MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
[213882]108
[bfb256]109TUTOR_FILES     = \
[67484b]110                tutor.tex examples.tex start.tex COPYING.texi
[bfb256]111
[dcc635]112IMAGES_UU       := $(wildcard images/*.uu)
[460c1e1]113IMAGES     := $(IMAGES_UU:images/%.uu=%)
[877605]114IMAGES_SRC := $(IMAGES:%=images/%)
[dcc635]115IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
[877605]116
[f36635]117# prepend bindir to path so that programs from there are taken first
118export PATH := "${bindir}:${PATH}"
119
[65a2bd]120###########################################################
121# top targets
122#
123
124.PHONY: info dvi ps html
125
[bfb256]126# default target
[0a2ba89]127all: info dvi html singular.idx
[bfb256]128
129# info stuff
[3de58c]130info: singular.hlp
[d30e2a8]131
[5a953a]132singular.hlp: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex
[d30e2a8]133        - ${MAKEINFO} --no-split singular.tex
134
[bfb256]135# dvi stuff
[dc3a44]136dvi: manual.dvi usercard.dvi
137
[5a953a]138singular.dvi: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex
[919954f]139        tex singular.tex
[b2650f]140        texindex singular.cp
[919954f]141        tex singular.tex
[b2650f]142        texindex singular.cp
[919954f]143        tex singular.tex
[a5bc69]144
[5a953a]145singular.pdf: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex
[175c56]146        ${TEXI2PDF} singular.tex
147
[5a953a]148manual.dvi: ${MANUAL_FILES} manual.tex s-plural.tex s-plulibs.tex
[919954f]149        tex manual.tex
[b2650f]150        texindex manual.cp
[919954f]151        tex manual.tex
[b2650f]152        texindex manual.cp
[919954f]153        tex manual.tex
[d30e2a8]154
[3de58c]155tutor.dvi: ${TUTOR_FILES}
[919954f]156        tex tutor.tex
157        tex tutor.tex
158        tex tutor.tex
[d30e2a8]159
[6fe0f6]160tutor.pdf: ${TUTOR_FILES}
161        ${TEXI2PDF} tutor.tex
162
[ddf961]163usercard.dvi: usercard.tex singcard.tex
164        ${TEX} $<
165
[5a953a]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
[bfb256]172# postscript stuff
[44a55c]173ps: dvi manual.ps usercard.ps
[bfb256]174
175usercard.ps: usercard.dvi
[33471f8]176        ${DVIPS} -t landscape -t a4 $< -o $@
[bfb256]177
178%.ps: %.dvi
179        ${DVIPS} $< -o $@
180
[65a2bd]181###########################################################
182# texinfo targets
183#
[53c00b]184manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
[dd39bd]185        +${DOC2TEX} -no_fun -o manual.tex singular.doc
[bfb256]186
[5a953a]187singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES)
[dd39bd]188        +${DOC2TEX} -o singular.tex singular.doc
[9c935cb]189
[65a2bd]190#pattern rule for tex files
191%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
[dd39bd]192        +${DOC2TEX} -o $@ -no_ex $<
[f36635]193
[3de58c]194%.tex: %.doc doc2tex.pl ${SINGULAR}
[dd39bd]195        +${DOC2TEX} -o $@ $<
[f36635]196
[65a2bd]197# pattern rules for lib docus
[c04b94]198${DOC_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
199        test -d ${DOC_SUBDIR} || mkdir ${DOC_SUBDIR}
[65a2bd]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
[c04b94]209.PRECIOUS: %.doc %_noFun.doc ${DOC_SUBDIR}/%_lib.pl
[f36635]210
[0a2ba89]211# index file for help
[6d5a600]212singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
[a70441f]213        ${PERL} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
[dcc635]214
[e3663f1]215###########################################################
216# stand-alone targest
217#
218
[3de58c]219STANDALONE_TXT_FILES := $(STANDALONE_TEXI_FILES:.texi=.txt)
[e3663f1]220STANDALONE_HTML_FILES := $(STANDALONE_TEXI_FILES:.texi=.html)
221STANDALONE_FILES      := $(STANDALONE_TEXI_FILES:.texi=)
222
[1a1f587]223ifeq ($(SINGUNAME),@SINGUNAME@)
224UNAME_OPT = -D UNAME
225endif
226
[f36635]227# targets which produce stand-alone documents
[354f3b]228%.${SINGUNAME}.txt : %.texi
[1a1f587]229        ${MAKEINFO} $(UNAME_OPT) --no-header --paragraph-indent none  -o $@ $<
[354f3b]230
[e3663f1]231%.txt :  %.texi
232        ${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
233
[354f3b]234%.${SINGUNAME}.html : %.texi
[3cc667]235        ${PERL} ${TEXI2HTML} $(UNAME_OPT) -init_file t2h_standalone.init -split none -out_file $@ $<
[354f3b]236
[e3663f1]237%.html : %.texi
[3cc667]238        ${PERL} ${TEXI2HTML} -init_file t2h_standalone.init -split none -out_file $@ $<
[e3663f1]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
[9ad738c]248WWW_DIR = /singular/www/2-0/
249FTP_DIR = /ftp/pub/Math/Singular/Development
250
251install-standalone: standalone
[ec8a650]252        cp INSTALL_unix.html COPYING.html INSTALL_win.html ${WWW_DIR}
[9ad738c]253        cp COPYING COPYING.html ${FTP_DIR}
254        cp INSTALL_unix INSTALL_unix.html ${FTP_DIR}
[bde8dd]255        cp INSTALL_win INSTALL_win.html ${FTP_DIR}
[9ad738c]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
[bfb256]263
[65a2bd]264###########################################################
265# html targets
266#
[e0101d]267html: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES)
[d462b24]268${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex s-plural.tex
[a70441f]269        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
[65a2bd]270        -top_file ${HTML_MANUAL_TOP} singular.tex
[877605]271
[65a2bd]272# html stuff
[e0101d]273html_tutor: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
[65a2bd]274${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
[a70441f]275        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
[65a2bd]276        -top_file ${HTML_TUTOR_TOP} tutor.tex
[877605]277
[0a2ba89]278${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
279
[e0101d]280${TMP_DIR}:
281        ${MKINSTALLDIRS} ${TMP_DIR}
282
[5faa8fd]283# pattern rules for images - but not everybody has gnu-uudecode
[877605]284images/%.gif : images/%.gif.uu
[a70441f]285        cd images; ${UUDECODE} ../$< ;cd ..
[877605]286
287images/%.jpg : images/%.jpg.uu
[a70441f]288        cd images; ${UUDECODE} ../$< ;cd ..
[877605]289
290images/%.xbm : images/%.xbm.uu
[a70441f]291        cd images; ${UUDECODE} ../$< ;cd ..
[bfb256]292
[3de58c]293${IMAGES_HTML} : ${IMAGES_SRC}
[14fed1]294        test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
295        cp ${IMAGES_SRC} ${HTML_SUBDIR}
[65a2bd]296
297###########################################################
298# misc targets
299#
[822e93b]300install: singular.hlp html singular.idx standalone
[d30e2a8]301        ${MKINSTALLDIRS} ${infodir}
302        ${INSTALL_DATA} singular.hlp ${infodir}
[1464878]303        test -r ${htmldir} || ln -s `pwd`/${HTML_SUBDIR} ${htmldir}
[c04b94]304        test -r ${exdir} || ln -s `pwd`/${EX_SUBDIR} ${exdir}
[d30e2a8]305
[be6689f]306install_all: install
307
[3de58c]308uninstall:
[d30e2a8]309        rm -f ${infodir}/singular.hlp
310        - rmdir ${infodir}
311
[a0b99e]312#stupid HP's don't allow copy with many arguments
[2dd25c]313install-sharedist: singular.hlp html singular.idx \
[c1cd11]314                   ${STANDALONE_HTML_FILES} ${STANDALONE_TXT_FILES}
[119b42]315        ${MKINSTALLDIRS} ${install_prefix}
[4b72f6]316        ${MKINSTALLDIRS} ${install_infodir}
317        ${INSTALL_DATA} singular.hlp ${install_infodir}
[685b4c]318        chmod -R +rX ${install_infodir}
[3de58c]319        ${MKINSTALLDIRS} ${install_htmldir}
[8543df4]320        cp ${HTML_SUBDIR}/*.htm ${install_htmldir}
321        cp ${HTML_SUBDIR}/*.gif ${install_htmldir}
[9d4824d]322        -cp ${HTML_SUBDIR}/*.png ${install_htmldir}
[6e0d73]323        cp ${HTML_SUBDIR}/*.jpg ${install_htmldir}
[a1e05c]324        chmod -R +rX ${install_htmldir}
[4b72f6]325        ${MKINSTALLDIRS} ${install_docdir}
326        ${INSTALL_DATA} singular.idx ${install_docdir}
[cc28f4b]327        ${INSTALL_DATA} ../GPL2 ${install_prefix}/GPL2
328        ${INSTALL_DATA} ../GPL3 ${install_prefix}/GPL3
[119b42]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}
[c84d678]333        ${INSTALL_DATA} README_distribution.txt ${install_prefix}/README
334        ${INSTALL_DATA} README_distribution.html ${install_prefix}/README.html
[685b4c]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}/
[c84d678]344
[1a1f587]345# use 'make INSTALL_unix.olaf.txt INSTALL_unix.olaf.html SINGUNAME=olaf'
346# to generate these files for uname 'olaf'
[354f3b]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
[a94090]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
[f00b02]362texi2html = $(TEXI2HTML:%.pl=%)
363
[8a0ba8]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
[f00b02]369        cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc
[8a0ba8]370        tar cf lib2doc.tar lib2doc
[9ead31]371        ${GZIP} lib2doc.tar
[8a0ba8]372
[0a2ba89]373clean: mostlyclean
[c04b94]374        /bin/rm -rf singular.tex manual.tex ${DOC_SUBDIR} ${EX_SUBDIR}
[0a2ba89]375
[3de58c]376mostlyclean:
[bfb256]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
[0a2ba89]381        /bin/rm -f *.tps *.vr *.vrs *.dvi *.ps
[5a953a]382        /bin/rm -f s-plural.tex
[0a2ba89]383        /bin/rm -f singular.hlp manual.hlp  ${DOC2TEX_FILES} singular.idx
[5a953a]384        /bin/rm -f manual.hlp
[b76972]385        /bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}
[e3663f1]386        /bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES}
[354f3b]387        /bin/rm -f INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
[d30e2a8]388
[0a2ba89]389distclean: clean
[bfb256]390        /bin/rm -f Makefile
[33c96a]391        /bin/rm -rf ${HTML_SUBDIR} ../html ../examples
[d30e2a8]392
393maintainer-clean: distclean
394
[1dba07]395depend:
396        @echo "No make depend available!"
397
[bfb256]398${SINGULAR}:
399#       cd ..; ${MAKE} ${SINGULAR}
[d30e2a8]400
401Makefile: Makefile.in
[755779]402        cd ..;  CONFIG_FILES="doc/Makefile" CONFIG_HEADERS= ./config.status
[717a9e]403
404html-done: ${MANUAL_FILES}
Note: See TracBrowser for help on using the repository browser.