source: git/doc/Makefile.in @ 1f2d3b

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