source: git/doc/Makefile.in @ 6b80bb

spielwiese
Last change on this file since 6b80bb was 6b80bb, checked in by Olaf Bachmann <obachman@…>, 25 years ago
* as we go along git-svn-id: file:///usr/local/Singular/svn/trunk@3272 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.1 KB
Line 
1#####################################################################
2###
3### Makefile for Singular documentation
4###
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@
17
18##
19## needed programs
20##
21@SET_MAKE@
22CC              = @CC@
23INSTALL         = ../install-sh -c
24INSTALL_PROGRAM = ${INSTALL}
25INSTALL_DATA    = ${INSTALL} -m 644
26MKINSTALLDIRS   = ../mkinstalldirs
27
28PERL5           = @PERL5@
29TEX             = tex
30MAKEINFO        = @MAKEINFO@
31TEXI2DVI        = @TEXI2DVI@
32TEXINDEX        = @TEXINDEX@
33TEXI2HTML       = @TEXI2HTML@
34DVIPS           = dvips
35IMAGES          = contents_motif.gif index_motif.gif \
36                next_motif.gif next_motif_gr.gif \
37                previous_motif.gif previous_motif_gr.gif \
38                singular-small.jpg singular.jpg \
39                invisible.xbm bg_left.gif bg_right.gif
40
41# d2t stuff
42SINGULAR        = @SINGULAR@
43LIBPARSE        = ${bindir}/libparse
44D2T_SUBDIR      = ./d2t_singular
45DOC2TEX         = ./doc2tex.pl -subdir ${D2T_SUBDIR} -Singular ${SINGULAR} \
46                        -libparse ${LIBPARSE} -I ../Singular/LIB
47TMP_DIR         = @TMP_DIR@
48TEXI2HTML_OPTS  = @TEXI2HTML_OPTS@ -l2h_tmp ${TMP_DIR}
49##
50## End configuration dependend stuff
51#################################################################
52
53# files
54TEX_FILES       = copyright.tex
55DOC2TEX_FILES   = \
56                examples.tex general.tex math.tex reference.tex \
57                start.tex types.tex pdata.tex tricks.tex
58
59MANUAL_FILES    = ${TEX_FILES} ${DOC2TEX_FILES}
60TUTOR_FILES     = \
61                tutor.tex examples.tex start.tex copyright.tex
62
63# prepend bindir to path so that programs from there are taken first
64export PATH := "${bindir}:${PATH}"
65
66.PHONY: info dvi ps
67# default target
68all: info dvi html
69
70# info stuff
71info: singular.hlp
72
73singular.hlp: ${MANUAL_FILES} singular.tex
74        - ${MAKEINFO} --no-split singular.tex
75
76# dvi stuff
77dvi: manual.dvi usercard.dvi
78
79singular.dvi: ${MANUAL_FILES} singular.tex
80        ${TEXI2DVI} singular.tex
81
82manual.dvi: ${MANUAL_FILES} manual.tex
83        ${TEXI2DVI} manual.tex
84
85tutor.dvi: ${TUTOR_FILES}
86        ${TEXI2DVI} tutor.tex
87
88usercard.dvi: usercard.tex singcard.tex
89        ${TEX} $<
90
91# postscript stuff
92ps: singular.ps usercard.ps
93
94usercard.ps: usercard.dvi
95        ${DVIPS} -t landscape -t a4 $< -o $@
96
97%.ps: %.dvi
98        ${DVIPS} $< -o $@
99
100# html stuff
101html: html/index.htm
102html/index.htm: ${MANUAL_FILES} t2h_singular.init t2h.init singular.tex ${TEXI2HTML}
103        ${PERL5} ${TEXI2HTML} -init_file t2h_singular.init ${TEXI2HTML_OPTS} -subdir html singular.tex
104
105# html stuff
106html_tutor: ${TUTOR_FILES}
107        test -d html_tutor || mkdir html_tutor
108        cd html_tutor && ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} ../tutor.tex
109        test -d html || mkdir html
110        test -d html/images || mkdir html/images
111        for img in ${IMAGES}; \
112        do \
113                echo uudecode images/$${img}.uu; \
114                uudecode images/$${img}.uu; \
115        done
116        test -e html_tutor/images || (cd html_tutor; ln -s ../html/images images)
117        touch html_tutor
118
119# how to create the texinfo files
120manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} ${LIBPARSE} singular.doc
121        ${PERL5} ${DOC2TEX} -o manual.tex singular.doc
122
123singular.tex: ${MANUAL_FILES} doc2tex.pl ${SINGULAR} ${LIBPARSE} singular.doc
124        ${PERL5} ${DOC2TEX} -lib_fun -lib_ex -o singular.tex singular.doc
125
126%.tex: %.doc doc2tex.pl ${SINGULAR} ${LIBPARSE}
127        ${PERL5} ${DOC2TEX} $*
128
129# targets which produce stand-alone documents
130COPYING: copyright.tex
131        ${MAKEINFO} --no-header -o COPYING copyright.tex
132
133
134# targets concerned with maintenance
135install: singular.hlp
136        ${MKINSTALLDIRS} ${infodir}
137        ${INSTALL_DATA} singular.hlp ${infodir}
138
139uninstall:
140        rm -f ${infodir}/singular.hlp
141        - rmdir ${infodir}
142
143clean:
144        /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt
145        /bin/rm -f save_i test.ascii test.mp
146        /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps
147        /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp
148        /bin/rm -f *.tps *.vr *.vrs
149        /bin/rm -f singular.hlp *.dvi *.ps ${DOC2TEX_FILES}
150        /bin/rm -rf singular.tex manual.tex  html ${D2T_SUBDIR}
151
152mostlyclean: clean
153
154distclean: mostlyclean
155        /bin/rm -f Makefile
156
157maintainer-clean: distclean
158
159${SINGULAR}:
160#       cd ..; ${MAKE} ${SINGULAR}
161
162Makefile: Makefile.in
163        cd ..; ${MAKE} doc/Makefile
164
165html-done: ${MANUAL_FILES}
166
Note: See TracBrowser for help on using the repository browser.