source: git/doc/Makefile.in @ 553006

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