source: git/doc/Makefile.in @ 33c96a

fieker-DuValspielwiese
Last change on this file since 33c96a was 33c96a, checked in by Hans Schönemann <hannes@…>, 24 years ago
*hannes: better cleanup git-svn-id: file:///usr/local/Singular/svn/trunk@4298 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 10.5 KB
Line 
1#####################################################################
2###
3### Makefile for Singular documentation
4### $Id: Makefile.in,v 1.64 2000-05-08 15:41:03 Singular 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            = @GZIP@
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_extn -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
89DOC2TEX_FILES   = \
90                examples.tex general.tex math.tex reference.tex \
91                start.tex types.tex pdata.tex tricks.tex platform.tex
92
93MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
94TUTOR_FILES     = \
95                tutor.tex examples.tex start.tex copyright.tex
96
97IMAGES_UU       := $(wildcard images/*.uu)
98IMAGES     := $(IMAGES_UU:images/%.uu=%)
99IMAGES_SRC := $(IMAGES:%=images/%)
100IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
101
102# prepend bindir to path so that programs from there are taken first
103export PATH := "${bindir}:${PATH}"
104
105###########################################################
106# top targets
107#
108
109.PHONY: info dvi ps html
110
111# default target
112all: info dvi html singular.idx
113
114# info stuff
115info: singular.hlp
116
117singular.hlp: ${MANUAL_FILES} singular.tex
118        - ${MAKEINFO} --no-split singular.tex
119
120# dvi stuff
121dvi: manual.dvi usercard.dvi
122
123singular.dvi: ${MANUAL_FILES} singular.tex
124        ${TEXI2DVI} singular.tex
125
126manual.dvi: ${MANUAL_FILES} manual.tex
127        ${TEXI2DVI} manual.tex
128
129tutor.dvi: ${TUTOR_FILES}
130        ${TEXI2DVI} tutor.tex
131
132usercard.dvi: usercard.tex singcard.tex
133        ${TEX} $<
134
135# postscript stuff
136ps: manual.ps usercard.ps
137
138usercard.ps: usercard.dvi
139        ${DVIPS} -t landscape -t a4 $< -o $@
140
141%.ps: %.dvi
142        ${DVIPS} $< -o $@
143
144###########################################################
145# texinfo targets
146#
147manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
148        ${DOC2TEX} -no_fun -o manual.tex singular.doc
149
150singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES)
151        ${DOC2TEX} -o singular.tex singular.doc
152
153#pattern rule for tex files
154%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
155        ${DOC2TEX} -o $@ -no_ex $<
156
157%.tex: %.doc doc2tex.pl ${SINGULAR}
158        ${DOC2TEX} -o $@ $<
159
160# pattern rules for lib docus
161${DOC_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
162        test -d ${DOC_SUBDIR} || mkdir ${DOC_SUBDIR}
163        ${LIBPARSE} -i $< > $@
164
165%_noFun.doc : %.pl pl2doc.pl
166        ${PL2DOC}  -no_fun -o $@  $<
167
168%.doc : %.pl pl2doc.pl
169        ${PL2DOC} -o $@ $<
170
171# do not delete intermediate .pl and .doc files
172.PRECIOUS: %.doc %_noFun.doc ${DOC_SUBDIR}/%_lib.pl
173
174# index file for help
175singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
176        ${PERL} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
177
178###########################################################
179# stand-alone targest
180#
181
182STANDALONE_TXT_FILES := $(STANDALONE_TEXI_FILES:.texi=.txt)
183STANDALONE_HTML_FILES := $(STANDALONE_TEXI_FILES:.texi=.html)
184STANDALONE_FILES      := $(STANDALONE_TEXI_FILES:.texi=)
185
186ifeq ($(SINGUNAME),@SINGUNAME@)
187UNAME_OPT = -D UNAME
188endif
189
190# targets which produce stand-alone documents
191%.${SINGUNAME}.txt : %.texi
192        ${MAKEINFO} $(UNAME_OPT) --no-header --paragraph-indent none  -o $@ $<
193
194%.txt :  %.texi
195        ${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
196
197%.${SINGUNAME}.html : %.texi
198        ${PERL} ${TEXI2HTML} $(UNAME_OPT) -init_file t2h_standalone.init -verbose -split none -o $@ $<
199
200%.html : %.texi
201        ${PERL} ${TEXI2HTML} -init_file t2h_standalone.init -verbose -split none -o $@ $<
202
203% : %.txt
204        cp $< $@
205
206standalone: standalone-txt standalone-html ${STANDALONE_FILES}
207
208standalone-html: ${STANDALONE_HTML_FILES}
209standalone-txt:  ${STANDALONE_TXT_FILES}
210
211WWW_DIR = /singular/www/2-0/
212FTP_DIR = /ftp/pub/Math/Singular/Development
213
214install-standalone: standalone
215        cp INSTALL_unix.html COPYING.html ${WWW_DIR}
216        cp COPYING COPYING.html ${FTP_DIR}
217        cp INSTALL_unix INSTALL_unix.html ${FTP_DIR}
218        cp README_ftp.html ${FTP_DIR}/README.html
219        cp README_ftp ${FTP_DIR}/README
220        cp NEWS.html NEWS ${FTP_DIR}
221        cp NEWS.html ${WWW_DIR}
222        - chmod g+w ${FTP_DIR}/*
223
224
225
226###########################################################
227# html targets
228#
229html: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES)
230${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex
231        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
232        -top_file ${HTML_MANUAL_TOP} singular.tex
233
234# html stuff
235html_tutor: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
236${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
237        ${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
238        -top_file ${HTML_TUTOR_TOP} tutor.tex
239
240${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
241
242${TMP_DIR}:
243        ${MKINSTALLDIRS} ${TMP_DIR}
244
245# pattern rules for images - but not everybody has gnu-uudecode
246images/%.gif : images/%.gif.uu
247        cd images; ${UUDECODE} ../$< ;cd ..
248
249images/%.jpg : images/%.jpg.uu
250        cd images; ${UUDECODE} ../$< ;cd ..
251
252images/%.xbm : images/%.xbm.uu
253        cd images; ${UUDECODE} ../$< ;cd ..
254
255${IMAGES_HTML} : ${IMAGES_SRC}
256        test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
257        cp ${IMAGES_SRC} ${HTML_SUBDIR}
258
259
260
261
262
263###########################################################
264# misc targets
265#
266install: singular.hlp html singular.idx
267        ${MKINSTALLDIRS} ${infodir}
268        ${INSTALL_DATA} singular.hlp ${infodir}
269        test -r ${htmldir} || ln -s `pwd`/${HTML_SUBDIR} ${htmldir}
270        test -r ${exdir} || ln -s `pwd`/${EX_SUBDIR} ${exdir}
271
272uninstall:
273        rm -f ${infodir}/singular.hlp
274        - rmdir ${infodir}
275
276#stupid HP's don't allow copy with many arguments
277install-sharedist: singular.hlp html singular.idx \
278                   ${STANDALONE_HTML_FILES} ${STANDALONE_TXT_FILES}
279        ${MKINSTALLDIRS} ${install_prefix}
280        ${MKINSTALLDIRS} ${install_infodir}
281        ${INSTALL_DATA} singular.hlp ${install_infodir}
282        ${MKINSTALLDIRS} ${install_htmldir}
283        cp ${HTML_SUBDIR}/*.htm ${install_htmldir}
284        cp ${HTML_SUBDIR}/*.gif ${install_htmldir}
285        cp ${HTML_SUBDIR}/*.jpg ${install_htmldir}
286        chmod -R +rX ${install_htmldir}
287        ${MKINSTALLDIRS} ${install_exdir}
288        cp -R examples ${install_prefix}
289        /bin/rm -f ${install_prefix}/examples/*.res
290        /bin/rm -f ${install_prefix}/examples/*.inc
291        chmod -R +rX ${install_prefix}/
292        ${MKINSTALLDIRS} ${install_docdir}
293        ${INSTALL_DATA} singular.idx ${install_docdir}
294        ${INSTALL_DATA} COPYING.txt ${install_prefix}/COPYING
295        ${INSTALL_DATA} COPYING.html ${install_prefix}
296        ${INSTALL_DATA} NEWS.txt ${install_prefix}/NEWS
297        ${INSTALL_DATA} NEWS.html ${install_prefix}
298        ${INSTALL_DATA} README_distribution.txt ${install_prefix}/README
299        ${INSTALL_DATA} README_distribution.html ${install_prefix}/README.html
300
301# use 'make INSTALL_unix.olaf.txt INSTALL_unix.olaf.html SINGUNAME=olaf'
302# to generate these files for uname 'olaf'
303install-bindist: INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
304        ${MKINSTALLDIRS} ${install_prefix}
305        ${INSTALL_DATA} INSTALL_unix.${SINGUNAME}.txt ${install_prefix}/INSTALL
306        ${INSTALL_DATA} INSTALL_unix.${SINGUNAME}.html ${install_prefix}/INSTALL.html
307
308install-ftp: ${STANDALONE_HTML_FILES} ${STANDALONE_TXT_FILES}
309        ${INSTALL_DATA} NEWS.txt ${ftpdir}/NEWS
310        ${INSTALL_DATA} NEWS.html ${ftpdir}
311        ${INSTALL_DATA} COPYING.txt ${ftpdir}/COPYING
312        ${INSTALL_DATA} COPYING.html ${ftpdir}
313        ${INSTALL_DATA} INSTALL_unix.txt ${ftpdir}/INSTALL_unix
314        ${INSTALL_DATA} INSTALL_unix.html ${ftpdir}
315        ${INSTALL_DATA} README_ftp.txt ${ftpdir}/README
316        ${INSTALL_DATA} README_ftp.html ${ftpdir}/README.html
317
318texi2html = $(TEXI2HTML:%.pl=%)
319
320lib2doc.tar.gz:
321        rm -rf lib2doc lib2doc.tar.gz
322        mkdir lib2doc
323        cp Makefile.lib2doc lib2doc/Makefile
324        ${MAKEINFO} --no-header --paragraph-indent none -o lib2doc/README lib2doc.texi
325        cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc
326        tar cf lib2doc.tar lib2doc
327        ${GZIP} lib2doc.tar
328
329clean: mostlyclean
330        /bin/rm -rf singular.tex manual.tex ${DOC_SUBDIR} ${EX_SUBDIR}
331
332mostlyclean:
333        /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt
334        /bin/rm -f save_i test.ascii test.mp
335        /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps
336        /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp
337        /bin/rm -f *.tps *.vr *.vrs *.dvi *.ps
338        /bin/rm -f singular.hlp manual.hlp  ${DOC2TEX_FILES} singular.idx
339        /bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}
340        /bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES}
341        /bin/rm -f INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
342
343distclean: clean
344        /bin/rm -f Makefile
345        /bin/rm -rf ${HTML_SUBDIR} ../html ../examples
346
347maintainer-clean: distclean
348
349${SINGULAR}:
350#       cd ..; ${MAKE} ${SINGULAR}
351
352Makefile: Makefile.in
353        cd ..; ${MAKE} doc/Makefile
354
355html-done: ${MANUAL_FILES}
356
Note: See TracBrowser for help on using the repository browser.