source: git/doc/Makefile.in @ 80c3d1

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