source: git/doc/Makefile.in @ 38eaf6f

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