source: git/doc/Makefile.in @ 685b4c

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