source: git/doc/Makefile.in @ f940e2

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