source: git/doc/Makefile.in @ 2e553a

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