source: git/doc/Makefile.in @ 119b42

spielwiese
Last change on this file since 119b42 was 119b42, checked in by Olaf Bachmann <obachman@…>, 24 years ago
* emacs stuff, NEWS, etc. git-svn-id: file:///usr/local/Singular/svn/trunk@3956 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 8.5 KB
RevLine 
[d30e2a8]1#####################################################################
2###
3### Makefile for Singular documentation
[119b42]4### $Id: Makefile.in,v 1.46 1999-12-03 11:20:43 obachman Exp $
[d30e2a8]5#####################################################################
6SHELL=/bin/sh
7
8####################################################################
9##
10## Configuration
11##
12
13## directory where info files are installed
14prefix          = @prefix@
[64c6d1]15infodir         = ${prefix}/info
[f36635]16bindir          = @bindir@
[460c1e1]17htmldir         = ${prefix}/html
[4b72f6]18install_infodir = ${install_prefix}/info
19install_htmldir = ${install_prefix}/html
20install_docdir  = ${install_prefix}/doc
[d30e2a8]21
22##
23## needed programs
24##
25@SET_MAKE@
[799256]26LN_S            = @LN_S@
[d30e2a8]27CC              = @CC@
28INSTALL         = ../install-sh -c
29INSTALL_PROGRAM = ${INSTALL}
30INSTALL_DATA    = ${INSTALL} -m 644
31MKINSTALLDIRS   = ../mkinstalldirs
32
[dc3a44]33PERL5           = @PERL5@
[d30e2a8]34TEX             = tex
[f36635]35MAKEINFO        = @MAKEINFO@
36TEXI2DVI        = @TEXI2DVI@
37TEXINDEX        = @TEXINDEX@
38TEXI2HTML       = @TEXI2HTML@
[d30e2a8]39DVIPS           = dvips
40
[354f3b]41VERBOSE         = 1 # override this with make VERBOSE=2
42SINGUNAME       = @SINGUNAME@
[f36635]43# d2t stuff
[64c6d1]44SINGULAR        = @SINGULAR@
[dcc635]45SINGULAR_LIB_DIR= ../Singular/LIB
[f36635]46LIBPARSE        = ${bindir}/libparse
47D2T_SUBDIR      = ./d2t_singular
[6d5a600]48CHKSUM_DB       = ${D2T_SUBDIR}/chksum
[65a2bd]49DOC2TEX         = ${PERL5} ./doc2tex.pl -subdir ${D2T_SUBDIR} \
[0a2ba89]50                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE}
[65a2bd]51PL2DOC          = ${PERL5} ./pl2doc.pl -db  ${CHKSUM_DB}
[dcc635]52
53# t2h stuff
[f36635]54TMP_DIR         = @TMP_DIR@
[dcc635]55HTML_SUBDIR     = html
56TEXI2HTML_INIT  = t2h_singular.init
[0a2ba89]57ifeq ($(VERBOSE),0)
58T2H_VERBOSE     = -no_verbose
59else
60T2H_VERBOSE     = -verbose
61endif
[dcc635]62TEXI2HTML_OPTS  = -init_file ${TEXI2HTML_INIT} @TEXI2HTML_OPTS@ \
[0a2ba89]63                  -short_extn -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \
64                  ${T2H_VERBOSE}
[dcc635]65HTML_MANUAL_PREFIX = sing
66HTML_TUTOR_PREFIX  = tut
67HTML_MANUAL_TOP    = index.htm
68HTML_TUTOR_TOP     = tutor.htm
[d30e2a8]69##
70## End configuration dependend stuff
71#################################################################
72
[65a2bd]73###########################################################
74# File sets
75#
[119b42]76STANDALONE_TEXI_FILES   = COPYING.texi INSTALL_unix.texi NEWS.texi
[e3663f1]77
[bfb256]78DOC2TEX_FILES   = \
79                examples.tex general.tex math.tex reference.tex \
[0a03bce]80                start.tex types.tex pdata.tex tricks.tex platform.tex
[d30e2a8]81
[bfb256]82MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
83TUTOR_FILES     = \
[6fc50d]84                tutor.tex examples.tex start.tex copyright.tex
[bfb256]85
[dcc635]86IMAGES_UU       := $(wildcard images/*.uu)
[460c1e1]87IMAGES     := $(IMAGES_UU:images/%.uu=%)
[877605]88IMAGES_SRC := $(IMAGES:%=images/%)
[dcc635]89IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
[877605]90
[f36635]91# prepend bindir to path so that programs from there are taken first
92export PATH := "${bindir}:${PATH}"
93
[65a2bd]94###########################################################
95# top targets
96#
97
98.PHONY: info dvi ps html
99
[bfb256]100# default target
[0a2ba89]101all: info dvi html singular.idx
[bfb256]102
103# info stuff
[d30e2a8]104info: singular.hlp
105
[dc3a44]106singular.hlp: ${MANUAL_FILES} singular.tex
[d30e2a8]107        - ${MAKEINFO} --no-split singular.tex
108
[bfb256]109# dvi stuff
[dc3a44]110dvi: manual.dvi usercard.dvi
111
112singular.dvi: ${MANUAL_FILES} singular.tex
113        ${TEXI2DVI} singular.tex
[d30e2a8]114
[dc3a44]115manual.dvi: ${MANUAL_FILES} manual.tex
116        ${TEXI2DVI} manual.tex
[d30e2a8]117
[dc3a44]118tutor.dvi: ${TUTOR_FILES}
[bfb256]119        ${TEXI2DVI} tutor.tex
[d30e2a8]120
[ddf961]121usercard.dvi: usercard.tex singcard.tex
122        ${TEX} $<
123
[bfb256]124# postscript stuff
[6d5a600]125ps: manual.ps usercard.ps
[bfb256]126
127usercard.ps: usercard.dvi
[33471f8]128        ${DVIPS} -t landscape -t a4 $< -o $@
[bfb256]129
130%.ps: %.dvi
131        ${DVIPS} $< -o $@
132
[65a2bd]133###########################################################
134# texinfo targets
135#
[53c00b]136manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
[65a2bd]137        ${DOC2TEX} -no_fun -o manual.tex singular.doc
[bfb256]138
[53c00b]139singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES)
[65a2bd]140        ${DOC2TEX} -o singular.tex singular.doc
[9c935cb]141
[65a2bd]142#pattern rule for tex files
143%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
144        ${DOC2TEX} -o $@ -no_ex $<
[f36635]145
[65a2bd]146%.tex: %.doc doc2tex.pl ${SINGULAR}
147        ${DOC2TEX} -o $@ $<
[f36635]148
[65a2bd]149# pattern rules for lib docus
150${D2T_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
151        test -d ${D2T_SUBDIR} || mkdir ${D2T_SUBDIR}
152        ${LIBPARSE} -i $< > $@
153
154%_noFun.doc : %.pl pl2doc.pl
155        ${PL2DOC}  -no_fun -o $@  $<
156
157%.doc : %.pl pl2doc.pl
158        ${PL2DOC} -o $@ $<
159
160# do not delete intermediate .pl and .doc files
161.PRECIOUS: %.doc %_noFun.doc ${D2T_SUBDIR}/%_lib.pl
[f36635]162
[0a2ba89]163# index file for help
[6d5a600]164singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
[0a2ba89]165        ${PERL5} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
[dcc635]166
[e3663f1]167###########################################################
168# stand-alone targest
169#
170
171STANDALONE_TXT_FILES := $(STANDALONE_TEXI_FILES:.texi=.txt)
172STANDALONE_HTML_FILES := $(STANDALONE_TEXI_FILES:.texi=.html)
173STANDALONE_FILES      := $(STANDALONE_TEXI_FILES:.texi=)
174
[f36635]175# targets which produce stand-alone documents
[354f3b]176%.${SINGUNAME}.txt : %.texi
177        ${MAKEINFO} -D UNAME --no-header --paragraph-indent none  -o $@ $<
178
[e3663f1]179%.txt :  %.texi
180        ${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
181
[354f3b]182%.${SINGUNAME}.html : %.texi
183        ${TEXI2HTML} -D UNAME -init_file t2h_standalone.init -verbose -split none -o $@ $<
184
[e3663f1]185%.html : %.texi
186        ${TEXI2HTML} -init_file t2h_standalone.init -verbose -split none -o $@ $<
187
188% : %.txt
189        cp $< $@
190
191standalone: standalone-txt standalone-html ${STANDALONE_FILES}
192
193standalone-html: ${STANDALONE_HTML_FILES}
194standalone-txt:  ${STANDALONE_TXT_FILES}
195
[bfb256]196
[65a2bd]197###########################################################
198# html targets
199#
[53c00b]200html: ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES)
[65a2bd]201${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex
202        ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
203        -top_file ${HTML_MANUAL_TOP} singular.tex
[877605]204
[65a2bd]205# html stuff
206html_tutor: ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
207${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
208        ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
209        -top_file ${HTML_TUTOR_TOP} tutor.tex
[877605]210
[0a2ba89]211${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
212
[65a2bd]213# pattern rules for images
[877605]214images/%.gif : images/%.gif.uu
215        uudecode $< -o $@
216
217images/%.jpg : images/%.jpg.uu
218        uudecode $< -o $@
219
220images/%.xbm : images/%.xbm.uu
221        uudecode $< -o $@
[bfb256]222
[774060]223${IMAGES_HTML} : ${IMAGES_SRC}
[14fed1]224        test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
225        cp ${IMAGES_SRC} ${HTML_SUBDIR}
[65a2bd]226
227
228
229
230
231###########################################################
232# misc targets
233#
[0a2ba89]234install: singular.hlp html/index.htm singular.idx
[d30e2a8]235        ${MKINSTALLDIRS} ${infodir}
236        ${INSTALL_DATA} singular.hlp ${infodir}
[1464878]237        test -r ${htmldir} || ln -s `pwd`/${HTML_SUBDIR} ${htmldir}
[d30e2a8]238
239uninstall:
240        rm -f ${infodir}/singular.hlp
241        - rmdir ${infodir}
242
[119b42]243install-sharedist: singular.hlp html/index.htm singular.idx \
244                   COPYING.txt COPYING.html NEWS.txt NEWS.html
245        ${MKINSTALLDIRS} ${install_prefix}
[4b72f6]246        ${MKINSTALLDIRS} ${install_infodir}
247        ${INSTALL_DATA} singular.hlp ${install_infodir}
248        ${MKINSTALLDIRS} ${install_htmldir}
249        cp ${HTML_SUBDIR}/* ${install_htmldir}
250        chmod 644 ${htmldir}/*
251        ${MKINSTALLDIRS} ${install_docdir}
252        ${INSTALL_DATA} singular.idx ${install_docdir}
[119b42]253        ${INSTALL_DATA} COPYING.txt ${install_prefix}/COPYING
254        ${INSTALL_DATA} COPYING.html ${install_prefix}
255        ${INSTALL_DATA} NEWS.txt ${install_prefix}/NEWS
256        ${INSTALL_DATA} NEWS.html ${install_prefix}
[4b72f6]257
[354f3b]258install-bindist: INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
259        ${MKINSTALLDIRS} ${install_prefix}
260        ${INSTALL_DATA} INSTALL_unix.${SINGUNAME}.txt ${install_prefix}/INSTALL
261        ${INSTALL_DATA} INSTALL_unix.${SINGUNAME}.html ${install_prefix}/INSTALL.html
262
[f00b02]263texi2html = $(TEXI2HTML:%.pl=%)
264
[8a0ba8]265lib2doc.tar.gz:
266        rm -rf lib2doc lib2doc.tar.gz
267        mkdir lib2doc
268        cp Makefile.lib2doc lib2doc/Makefile
269        ${MAKEINFO} --no-header --paragraph-indent none -o lib2doc/README lib2doc.texi
[f00b02]270        cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc
[8a0ba8]271        tar cf lib2doc.tar lib2doc
272        gzip lib2doc.tar
273
[0a2ba89]274clean: mostlyclean
[1a13a37]275        /bin/rm -rf singular.tex manual.tex  ${HTML_SUBDIR} ${D2T_SUBDIR}
[0a2ba89]276
277mostlyclean:
[bfb256]278        /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt
279        /bin/rm -f save_i test.ascii test.mp
280        /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps
281        /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp
[0a2ba89]282        /bin/rm -f *.tps *.vr *.vrs *.dvi *.ps
283        /bin/rm -f singular.hlp manual.hlp  ${DOC2TEX_FILES} singular.idx
284        /bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}
[e3663f1]285        /bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES}
[354f3b]286        /bin/rm -f INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
[d30e2a8]287
[0a2ba89]288distclean: clean
[bfb256]289        /bin/rm -f Makefile
[d30e2a8]290
291maintainer-clean: distclean
292
[bfb256]293${SINGULAR}:
294#       cd ..; ${MAKE} ${SINGULAR}
[d30e2a8]295
296Makefile: Makefile.in
[bfb256]297        cd ..; ${MAKE} doc/Makefile
[717a9e]298
299html-done: ${MANUAL_FILES}
300
Note: See TracBrowser for help on using the repository browser.