source: git/doc/Makefile.in @ 119b42

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