source: git/doc/Makefile.in @ 2e0b620

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