source: git/doc/Makefile.in @ f00b02

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