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
Line 
1#####################################################################
2###
3### Makefile for Singular documentation
4### $Id: Makefile.in,v 1.79 2001-08-27 14:40:02 Singular Exp $
5#####################################################################
6SHELL=/bin/sh
7
8####################################################################
9##
10## Configuration
11##
12SINGUNAME       = @SINGUNAME@
13S_VERSION       = $${SINGULAR_VERSION-@SINGULAR_VERSION@}
14
15## directory where info files are installed
16prefix          = @prefix@
17infodir         = ${prefix}/info
18bindir          = @bindir@
19htmldir         = ${prefix}/html
20exdir           = ${prefix}/examples
21
22localdir        = /usr/local
23install_prefix  = ${localdir}/Singular/${S_VERSION}
24install_infodir = ${install_prefix}/info
25install_htmldir = ${install_prefix}/html
26install_docdir  = ${install_prefix}/doc
27install_exdir   = ${install_prefix}/examples
28
29# directory where files for ftp site go
30ftpdir          = /tmp
31
32##
33## needed programs
34##
35@SET_MAKE@
36LN_S            = @LN_S@
37CC              = @CC@
38INSTALL         = ../install-sh -c
39INSTALL_PROGRAM = ${INSTALL}
40INSTALL_DATA    = ${INSTALL} -m 644
41MKINSTALLDIRS   = ../mkinstalldirs
42GZIP            = @MYGZIP@
43UUDECODE        = @UUDECODE@
44
45PERL            = @PERL@
46TEX             = tex
47MAKEINFO        = @MAKEINFO@ --force
48TEXI2DVI        = @TEXI2DVI@
49TEXINDEX        = @TEXINDEX@
50# use our local texi2html
51TEXI2HTML       = ./texi2html
52DVIPS           = dvips
53
54VERBOSE         = 1 # override this with make VERBOSE=2
55
56# d2t stuff
57SINGULAR        = @SINGULAR@
58SINGULAR_LIB_DIR= ../Singular/LIB
59LIBPARSE        = ${bindir}/libparse
60DOC_SUBDIR      = ./d2t_singular
61EX_SUBDIR       = ./examples
62CHKSUM_DB       = ${DOC_SUBDIR}/chksum
63DOC2TEX         = ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
64                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
65                  -exdir ${EX_SUBDIR}
66PL2DOC          = ${PERL} ./pl2doc.pl -db  ${CHKSUM_DB}
67
68# t2h stuff
69TMP_DIR         = @TMP_DIR@
70HTML_SUBDIR     = html
71TEXI2HTML_INIT  = t2h_singular.init
72ifeq ($(VERBOSE),0)
73T2H_VERBOSE     =
74else
75T2H_VERBOSE     = -Verbose
76endif
77TEXI2HTML_OPTS  = -init_file ${TEXI2HTML_INIT} @TEXI2HTML_OPTS@ \
78                  -short_ext -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \
79                  ${T2H_VERBOSE}
80HTML_MANUAL_PREFIX = sing
81HTML_TUTOR_PREFIX  = tut
82HTML_MANUAL_TOP    = index.htm
83HTML_TUTOR_TOP     = tutor.htm
84##
85## End configuration dependend stuff
86#################################################################
87
88###########################################################
89# File sets
90#
91STANDALONE_TEXI_FILES   = COPYING.texi INSTALL_unix.texi NEWS.texi \
92                          README_download.texi README_ftp.texi \
93                          README_distribution.texi README_src.texi \
94                          INSTALL_win.texi
95
96DOC2TEX_FILES   = \
97                examples.tex general.tex ti_ip.tex math.tex reference.tex \
98                start.tex types.tex pdata.tex tricks.tex platform.tex
99
100MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
101TUTOR_FILES     = \
102                tutor.tex examples.tex start.tex copyright.tex
103
104IMAGES_UU       := $(wildcard images/*.uu)
105IMAGES     := $(IMAGES_UU:images/%.uu=%)
106IMAGES_SRC := $(IMAGES:%=images/%)
107IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
108
109# prepend bindir to path so that programs from there are taken first
110export PATH := "${bindir}:${PATH}"
111
112###########################################################
113# top targets
114#
115
116.PHONY: info dvi ps html
117
118# default target
119all: info dvi html singular.idx
120
121# info stuff
122info: singular.hlp
123
124singular.hlp: ${MANUAL_FILES} singular.tex
125        - ${MAKEINFO} --no-split singular.tex
126
127# dvi stuff
128dvi: manual.dvi usercard.dvi
129
130singular.dvi: ${MANUAL_FILES} singular.tex
131        ${TEXI2DVI} singular.tex
132
133manual.dvi: ${MANUAL_FILES} manual.tex
134        ${TEXI2DVI} manual.tex
135
136tutor.dvi: ${TUTOR_FILES}
137        ${TEXI2DVI} tutor.tex
138
139usercard.dvi: usercard.tex singcard.tex
140        ${TEX} $<
141
142# postscript stuff
143ps: manual.ps usercard.ps
144
145usercard.ps: usercard.dvi
146        ${DVIPS} -t landscape -t a4 $< -o $@
147
148%.ps: %.dvi
149        ${DVIPS} $< -o $@
150
151###########################################################
152# texinfo targets
153#
154manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
155        ${DOC2TEX} -no_fun -o manual.tex singular.doc
156
157singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES)
158        ${DOC2TEX} -o singular.tex singular.doc
159
160#pattern rule for tex files
161%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
162        ${DOC2TEX} -o $@ -no_ex $<
163
164%.tex: %.doc doc2tex.pl ${SINGULAR}
165        ${DOC2TEX} -o $@ $<
166
167# pattern rules for lib docus
168${DOC_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
169        test -d ${DOC_SUBDIR} || mkdir ${DOC_SUBDIR}
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
179.PRECIOUS: %.doc %_noFun.doc ${DOC_SUBDIR}/%_lib.pl
180
181# index file for help
182singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
183        ${PERL} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
184
185###########################################################
186# stand-alone targest
187#
188
189STANDALONE_TXT_FILES := $(STANDALONE_TEXI_FILES:.texi=.txt)
190STANDALONE_HTML_FILES := $(STANDALONE_TEXI_FILES:.texi=.html)
191STANDALONE_FILES      := $(STANDALONE_TEXI_FILES:.texi=)
192
193ifeq ($(SINGUNAME),@SINGUNAME@)
194UNAME_OPT = -D UNAME
195endif
196
197# targets which produce stand-alone documents
198%.${SINGUNAME}.txt : %.texi
199        ${MAKEINFO} $(UNAME_OPT) --no-header --paragraph-indent none  -o $@ $<
200
201%.txt :  %.texi
202        ${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
203
204%.${SINGUNAME}.html : %.texi
205        ${PERL} ${TEXI2HTML} $(UNAME_OPT) -init_file t2h_standalone.init -split none -out_file $@ $<
206
207%.html : %.texi
208        ${PERL} ${TEXI2HTML} -init_file t2h_standalone.init -split none -out_file $@ $<
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
218WWW_DIR = /singular/www/2-0/
219FTP_DIR = /ftp/pub/Math/Singular/Development
220
221install-standalone: standalone
222        cp INSTALL_unix.html COPYING.html INSTALL_win.html ${WWW_DIR}
223        cp COPYING COPYING.html ${FTP_DIR}
224        cp INSTALL_unix INSTALL_unix.html ${FTP_DIR}
225        cp INSTALL_win INSTALL_win.html ${FTP_DIR}
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
233
234###########################################################
235# html targets
236#
237html: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES)
238${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex
239        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
240        -top_file ${HTML_MANUAL_TOP} singular.tex
241
242# html stuff
243html_tutor: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
244${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
245        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
246        -top_file ${HTML_TUTOR_TOP} tutor.tex
247
248${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
249
250${TMP_DIR}:
251        ${MKINSTALLDIRS} ${TMP_DIR}
252
253# pattern rules for images - but not everybody has gnu-uudecode
254images/%.gif : images/%.gif.uu
255        cd images; ${UUDECODE} ../$< ;cd ..
256
257images/%.jpg : images/%.jpg.uu
258        cd images; ${UUDECODE} ../$< ;cd ..
259
260images/%.xbm : images/%.xbm.uu
261        cd images; ${UUDECODE} ../$< ;cd ..
262
263${IMAGES_HTML} : ${IMAGES_SRC}
264        test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
265        cp ${IMAGES_SRC} ${HTML_SUBDIR}
266
267
268
269
270
271###########################################################
272# misc targets
273#
274install: singular.hlp html singular.idx standalone
275        ${MKINSTALLDIRS} ${infodir}
276        ${INSTALL_DATA} singular.hlp ${infodir}
277        test -r ${htmldir} || ln -s `pwd`/${HTML_SUBDIR} ${htmldir}
278        test -r ${exdir} || ln -s `pwd`/${EX_SUBDIR} ${exdir}
279
280uninstall:
281        rm -f ${infodir}/singular.hlp
282        - rmdir ${infodir}
283
284#stupid HP's don't allow copy with many arguments
285install-sharedist: singular.hlp html singular.idx \
286                   ${STANDALONE_HTML_FILES} ${STANDALONE_TXT_FILES}
287        ${MKINSTALLDIRS} ${install_prefix}
288        ${MKINSTALLDIRS} ${install_infodir}
289        ${INSTALL_DATA} singular.hlp ${install_infodir}
290        chmod -R +rX ${install_infodir}
291        ${MKINSTALLDIRS} ${install_htmldir}
292        cp ${HTML_SUBDIR}/*.htm ${install_htmldir}
293        cp ${HTML_SUBDIR}/*.gif ${install_htmldir}
294        cp ${HTML_SUBDIR}/*.jpg ${install_htmldir}
295        chmod -R +rX ${install_htmldir}
296        ${MKINSTALLDIRS} ${install_docdir}
297        ${INSTALL_DATA} singular.idx ${install_docdir}
298        ${INSTALL_DATA} ../GPL ${install_prefix}/GPL
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}
303        ${INSTALL_DATA} README_distribution.txt ${install_prefix}/README
304        ${INSTALL_DATA} README_distribution.html ${install_prefix}/README.html
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}/
314
315# use 'make INSTALL_unix.olaf.txt INSTALL_unix.olaf.html SINGUNAME=olaf'
316# to generate these files for uname 'olaf'
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
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
332texi2html = $(TEXI2HTML:%.pl=%)
333
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
339        cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc
340        tar cf lib2doc.tar lib2doc
341        ${GZIP} lib2doc.tar
342
343clean: mostlyclean
344        /bin/rm -rf singular.tex manual.tex ${DOC_SUBDIR} ${EX_SUBDIR}
345
346mostlyclean:
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
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}
354        /bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES}
355        /bin/rm -f INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
356
357distclean: clean
358        /bin/rm -f Makefile
359        /bin/rm -rf ${HTML_SUBDIR} ../html ../examples
360
361maintainer-clean: distclean
362
363${SINGULAR}:
364#       cd ..; ${MAKE} ${SINGULAR}
365
366Makefile: Makefile.in
367        cd ..;  CONFIG_FILES="doc/Makefile" CONFIG_HEADERS= ./config.status
368
369html-done: ${MANUAL_FILES}
370
Note: See TracBrowser for help on using the repository browser.