source: git/doc/Makefile.in @ 4b72f6

jengelh-datetimespielwiese
Last change on this file since 4b72f6 was 4b72f6, checked in by Olaf Bachmann <obachman@…>, 23 years ago
insatllation proocedure git-svn-id: file:///usr/local/Singular/svn/trunk@3918 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 6.9 KB
Line 
1#####################################################################
2###
3### Makefile for Singular documentation
4### $Id: Makefile.in,v 1.41 1999-11-24 18:50:40 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#
75TEX_FILES       = copyright.tex
76DOC2TEX_FILES   = \
77                examples.tex general.tex math.tex reference.tex \
78                start.tex types.tex pdata.tex tricks.tex platform.tex
79
80MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
81TUTOR_FILES     = \
82                tutor.tex examples.tex start.tex copyright.tex
83
84IMAGES_UU       := $(wildcard images/*.uu)
85IMAGES     := $(IMAGES_UU:images/%.uu=%)
86IMAGES_SRC := $(IMAGES:%=images/%)
87IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
88
89# prepend bindir to path so that programs from there are taken first
90export PATH := "${bindir}:${PATH}"
91
92###########################################################
93# top targets
94#
95
96.PHONY: info dvi ps html
97
98# default target
99all: info dvi html singular.idx
100
101# info stuff
102info: singular.hlp
103
104singular.hlp: ${MANUAL_FILES} singular.tex
105        - ${MAKEINFO} --no-split singular.tex
106
107# dvi stuff
108dvi: manual.dvi usercard.dvi
109
110singular.dvi: ${MANUAL_FILES} singular.tex
111        ${TEXI2DVI} singular.tex
112
113manual.dvi: ${MANUAL_FILES} manual.tex
114        ${TEXI2DVI} manual.tex
115
116tutor.dvi: ${TUTOR_FILES}
117        ${TEXI2DVI} tutor.tex
118
119usercard.dvi: usercard.tex singcard.tex
120        ${TEX} $<
121
122# postscript stuff
123ps: manual.ps usercard.ps
124
125usercard.ps: usercard.dvi
126        ${DVIPS} -t landscape -t a4 $< -o $@
127
128%.ps: %.dvi
129        ${DVIPS} $< -o $@
130
131###########################################################
132# texinfo targets
133#
134manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc
135        ${DOC2TEX} -no_fun -o manual.tex singular.doc
136
137singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc
138        ${DOC2TEX} -o singular.tex singular.doc
139
140#pattern rule for tex files
141%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
142        ${DOC2TEX} -o $@ -no_ex $<
143
144%.tex: %.doc doc2tex.pl ${SINGULAR}
145        ${DOC2TEX} -o $@ $<
146
147# pattern rules for lib docus
148${D2T_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
149        test -d ${D2T_SUBDIR} || mkdir ${D2T_SUBDIR}
150        ${LIBPARSE} -i $< > $@
151
152%_noFun.doc : %.pl pl2doc.pl
153        ${PL2DOC}  -no_fun -o $@  $<
154
155%.doc : %.pl pl2doc.pl
156        ${PL2DOC} -o $@ $<
157
158# do not delete intermediate .pl and .doc files
159.PRECIOUS: %.doc %_noFun.doc ${D2T_SUBDIR}/%_lib.pl
160
161# index file for help
162singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
163        ${PERL5} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
164
165# targets which produce stand-alone documents
166COPYING: copyright.tex
167        ${MAKEINFO} --no-header --paragraph-indent none -o COPYING copyright.tex
168
169###########################################################
170# html targets
171#
172html: ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML}
173${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex
174        ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
175        -top_file ${HTML_MANUAL_TOP} singular.tex
176
177# html stuff
178html_tutor: ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
179${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
180        ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
181        -top_file ${HTML_TUTOR_TOP} tutor.tex
182
183${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
184
185# pattern rules for images
186images/%.gif : images/%.gif.uu
187        uudecode $< -o $@
188
189images/%.jpg : images/%.jpg.uu
190        uudecode $< -o $@
191
192images/%.xbm : images/%.xbm.uu
193        uudecode $< -o $@
194
195${IMAGES_HTML} : ${IMAGES_SRC}
196        test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
197        cp ${IMAGES_SRC} ${HTML_SUBDIR}
198
199
200
201
202
203###########################################################
204# misc targets
205#
206install: singular.hlp html/index.htm singular.idx
207        ${MKINSTALLDIRS} ${infodir}
208        ${INSTALL_DATA} singular.hlp ${infodir}
209        test -r ${htmldir} || ln -s `pwd`/${HTML_SUBDIR} ${htmldir}
210
211uninstall:
212        rm -f ${infodir}/singular.hlp
213        - rmdir ${infodir}
214
215install-sharedist: singular.hlp html/index.htm singular.idx
216        ${MKINSTALLDIRS} ${install_infodir}
217        ${INSTALL_DATA} singular.hlp ${install_infodir}
218        ${MKINSTALLDIRS} ${install_htmldir}
219        cp ${HTML_SUBDIR}/* ${install_htmldir}
220        chmod 644 ${htmldir}/*
221        ${MKINSTALLDIRS} ${install_docdir}
222        ${INSTALL_DATA} singular.idx ${install_docdir}
223
224texi2html = $(TEXI2HTML:%.pl=%)
225
226lib2doc.tar.gz:
227        rm -rf lib2doc lib2doc.tar.gz
228        mkdir lib2doc
229        cp Makefile.lib2doc lib2doc/Makefile
230        ${MAKEINFO} --no-header --paragraph-indent none -o lib2doc/README lib2doc.texi
231        cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc
232        tar cf lib2doc.tar lib2doc
233        gzip lib2doc.tar
234
235clean: mostlyclean
236        /bin/rm -rf singular.tex manual.tex  ${HTML_SUBDIR} ${D2T_SUBDIR}
237
238mostlyclean:
239        /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt
240        /bin/rm -f save_i test.ascii test.mp
241        /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps
242        /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp
243        /bin/rm -f *.tps *.vr *.vrs *.dvi *.ps
244        /bin/rm -f singular.hlp manual.hlp  ${DOC2TEX_FILES} singular.idx
245        /bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}
246
247distclean: clean
248        /bin/rm -f Makefile
249
250maintainer-clean: distclean
251
252${SINGULAR}:
253#       cd ..; ${MAKE} ${SINGULAR}
254
255Makefile: Makefile.in
256        cd ..; ${MAKE} doc/Makefile
257
258html-done: ${MANUAL_FILES}
259
Note: See TracBrowser for help on using the repository browser.