source: git/doc/Makefile.in @ e3663f1

fieker-DuValspielwiese
Last change on this file since e3663f1 was e3663f1, checked in by Olaf Bachmann <obachman@…>, 24 years ago
* Emacs stuff git-svn-id: file:///usr/local/Singular/svn/trunk@3928 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 7.5 KB
Line 
1#####################################################################
2###
3### Makefile for Singular documentation
4### $Id: Makefile.in,v 1.42 1999-11-26 13:26:54 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
18install_infodir = ${install_prefix}/info
19install_htmldir = ${install_prefix}/html
20install_docdir  = ${install_prefix}/doc
21
22##
23## needed programs
24##
25@SET_MAKE@
26LN_S            = @LN_S@
27CC              = @CC@
28INSTALL         = ../install-sh -c
29INSTALL_PROGRAM = ${INSTALL}
30INSTALL_DATA    = ${INSTALL} -m 644
31MKINSTALLDIRS   = ../mkinstalldirs
32
33PERL5           = @PERL5@
34TEX             = tex
35MAKEINFO        = @MAKEINFO@
36TEXI2DVI        = @TEXI2DVI@
37TEXINDEX        = @TEXINDEX@
38TEXI2HTML       = @TEXI2HTML@
39DVIPS           = dvips
40VERBOSE         = 1 # override this with make VERBOSE=2
41
42# d2t stuff
43SINGULAR        = @SINGULAR@
44SINGULAR_LIB_DIR= ../Singular/LIB
45LIBPARSE        = ${bindir}/libparse
46D2T_SUBDIR      = ./d2t_singular
47CHKSUM_DB       = ${D2T_SUBDIR}/chksum
48DOC2TEX         = ${PERL5} ./doc2tex.pl -subdir ${D2T_SUBDIR} \
49                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE}
50PL2DOC          = ${PERL5} ./pl2doc.pl -db  ${CHKSUM_DB}
51
52# t2h stuff
53TMP_DIR         = @TMP_DIR@
54HTML_SUBDIR     = html
55TEXI2HTML_INIT  = t2h_singular.init
56ifeq ($(VERBOSE),0)
57T2H_VERBOSE     = -no_verbose
58else
59T2H_VERBOSE     = -verbose
60endif
61TEXI2HTML_OPTS  = -init_file ${TEXI2HTML_INIT} @TEXI2HTML_OPTS@ \
62                  -short_extn -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \
63                  ${T2H_VERBOSE}
64HTML_MANUAL_PREFIX = sing
65HTML_TUTOR_PREFIX  = tut
66HTML_MANUAL_TOP    = index.htm
67HTML_TUTOR_TOP     = tutor.htm
68##
69## End configuration dependend stuff
70#################################################################
71
72###########################################################
73# File sets
74#
75STANDALONE_TEXI_FILES   = COPYING.texi
76
77DOC2TEX_FILES   = \
78                examples.tex general.tex math.tex reference.tex \
79                start.tex types.tex pdata.tex tricks.tex platform.tex
80
81MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
82TUTOR_FILES     = \
83                tutor.tex examples.tex start.tex copyright.tex
84
85IMAGES_UU       := $(wildcard images/*.uu)
86IMAGES     := $(IMAGES_UU:images/%.uu=%)
87IMAGES_SRC := $(IMAGES:%=images/%)
88IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
89
90# prepend bindir to path so that programs from there are taken first
91export PATH := "${bindir}:${PATH}"
92
93###########################################################
94# top targets
95#
96
97.PHONY: info dvi ps html
98
99# default target
100all: info dvi html singular.idx
101
102# info stuff
103info: singular.hlp
104
105singular.hlp: ${MANUAL_FILES} singular.tex
106        - ${MAKEINFO} --no-split singular.tex
107
108# dvi stuff
109dvi: manual.dvi usercard.dvi
110
111singular.dvi: ${MANUAL_FILES} singular.tex
112        ${TEXI2DVI} singular.tex
113
114manual.dvi: ${MANUAL_FILES} manual.tex
115        ${TEXI2DVI} manual.tex
116
117tutor.dvi: ${TUTOR_FILES}
118        ${TEXI2DVI} tutor.tex
119
120usercard.dvi: usercard.tex singcard.tex
121        ${TEX} $<
122
123# postscript stuff
124ps: manual.ps usercard.ps
125
126usercard.ps: usercard.dvi
127        ${DVIPS} -t landscape -t a4 $< -o $@
128
129%.ps: %.dvi
130        ${DVIPS} $< -o $@
131
132###########################################################
133# texinfo targets
134#
135manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc
136        ${DOC2TEX} -no_fun -o manual.tex singular.doc
137
138singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc
139        ${DOC2TEX} -o singular.tex singular.doc
140
141#pattern rule for tex files
142%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
143        ${DOC2TEX} -o $@ -no_ex $<
144
145%.tex: %.doc doc2tex.pl ${SINGULAR}
146        ${DOC2TEX} -o $@ $<
147
148# pattern rules for lib docus
149${D2T_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
150        test -d ${D2T_SUBDIR} || mkdir ${D2T_SUBDIR}
151        ${LIBPARSE} -i $< > $@
152
153%_noFun.doc : %.pl pl2doc.pl
154        ${PL2DOC}  -no_fun -o $@  $<
155
156%.doc : %.pl pl2doc.pl
157        ${PL2DOC} -o $@ $<
158
159# do not delete intermediate .pl and .doc files
160.PRECIOUS: %.doc %_noFun.doc ${D2T_SUBDIR}/%_lib.pl
161
162# index file for help
163singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
164        ${PERL5} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
165
166###########################################################
167# stand-alone targest
168#
169
170STANDALONE_TXT_FILES := $(STANDALONE_TEXI_FILES:.texi=.txt)
171STANDALONE_HTML_FILES := $(STANDALONE_TEXI_FILES:.texi=.html)
172STANDALONE_FILES      := $(STANDALONE_TEXI_FILES:.texi=)
173
174# targets which produce stand-alone documents
175%.txt :  %.texi
176        ${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
177
178%.html : %.texi
179        ${TEXI2HTML} -init_file t2h_standalone.init -verbose -split none -o $@ $<
180
181% : %.txt
182        cp $< $@
183
184standalone: standalone-txt standalone-html ${STANDALONE_FILES}
185
186standalone-html: ${STANDALONE_HTML_FILES}
187standalone-txt:  ${STANDALONE_TXT_FILES}
188
189
190###########################################################
191# html targets
192#
193html: ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML}
194${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex
195        ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
196        -top_file ${HTML_MANUAL_TOP} singular.tex
197
198# html stuff
199html_tutor: ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
200${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
201        ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
202        -top_file ${HTML_TUTOR_TOP} tutor.tex
203
204${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
205
206# pattern rules for images
207images/%.gif : images/%.gif.uu
208        uudecode $< -o $@
209
210images/%.jpg : images/%.jpg.uu
211        uudecode $< -o $@
212
213images/%.xbm : images/%.xbm.uu
214        uudecode $< -o $@
215
216${IMAGES_HTML} : ${IMAGES_SRC}
217        test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
218        cp ${IMAGES_SRC} ${HTML_SUBDIR}
219
220
221
222
223
224###########################################################
225# misc targets
226#
227install: singular.hlp html/index.htm singular.idx
228        ${MKINSTALLDIRS} ${infodir}
229        ${INSTALL_DATA} singular.hlp ${infodir}
230        test -r ${htmldir} || ln -s `pwd`/${HTML_SUBDIR} ${htmldir}
231
232uninstall:
233        rm -f ${infodir}/singular.hlp
234        - rmdir ${infodir}
235
236install-sharedist: singular.hlp html/index.htm singular.idx
237        ${MKINSTALLDIRS} ${install_infodir}
238        ${INSTALL_DATA} singular.hlp ${install_infodir}
239        ${MKINSTALLDIRS} ${install_htmldir}
240        cp ${HTML_SUBDIR}/* ${install_htmldir}
241        chmod 644 ${htmldir}/*
242        ${MKINSTALLDIRS} ${install_docdir}
243        ${INSTALL_DATA} singular.idx ${install_docdir}
244
245texi2html = $(TEXI2HTML:%.pl=%)
246
247lib2doc.tar.gz:
248        rm -rf lib2doc lib2doc.tar.gz
249        mkdir lib2doc
250        cp Makefile.lib2doc lib2doc/Makefile
251        ${MAKEINFO} --no-header --paragraph-indent none -o lib2doc/README lib2doc.texi
252        cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc
253        tar cf lib2doc.tar lib2doc
254        gzip lib2doc.tar
255
256clean: mostlyclean
257        /bin/rm -rf singular.tex manual.tex  ${HTML_SUBDIR} ${D2T_SUBDIR}
258
259mostlyclean:
260        /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt
261        /bin/rm -f save_i test.ascii test.mp
262        /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps
263        /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp
264        /bin/rm -f *.tps *.vr *.vrs *.dvi *.ps
265        /bin/rm -f singular.hlp manual.hlp  ${DOC2TEX_FILES} singular.idx
266        /bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}
267        /bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES}
268
269distclean: clean
270        /bin/rm -f Makefile
271
272maintainer-clean: distclean
273
274${SINGULAR}:
275#       cd ..; ${MAKE} ${SINGULAR}
276
277Makefile: Makefile.in
278        cd ..; ${MAKE} doc/Makefile
279
280html-done: ${MANUAL_FILES}
281
Note: See TracBrowser for help on using the repository browser.