1 | ##################################################################### |
---|
2 | ### |
---|
3 | ### Makefile for Singular documentation |
---|
4 | ### |
---|
5 | ##################################################################### |
---|
6 | SHELL=/bin/sh |
---|
7 | |
---|
8 | #################################################################### |
---|
9 | ## |
---|
10 | ## Configuration |
---|
11 | ## |
---|
12 | |
---|
13 | ## directory where info files are installed |
---|
14 | prefix = @prefix@ |
---|
15 | infodir = ${prefix}/info |
---|
16 | |
---|
17 | ## |
---|
18 | ## needed programs |
---|
19 | ## |
---|
20 | @SET_MAKE@ |
---|
21 | CC = @CC@ |
---|
22 | INSTALL = ../install-sh -c |
---|
23 | INSTALL_PROGRAM = ${INSTALL} |
---|
24 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
25 | MKINSTALLDIRS = ../mkinstalldirs |
---|
26 | |
---|
27 | TEX = tex |
---|
28 | MAKEINFO = makeinfo |
---|
29 | TEXI2DVI = texi2dvi |
---|
30 | TEXINDEX = texindex |
---|
31 | DVIPS = dvips |
---|
32 | IMAGES = contents_motif.gif index_motif.gif \ |
---|
33 | next_motif.gif next_motif_gr.gif \ |
---|
34 | previous_motif.gif previous_motif_gr.gif \ |
---|
35 | singular-small.jpg singular.jpg |
---|
36 | |
---|
37 | SINGULAR = @SINGULAR@ |
---|
38 | ## |
---|
39 | ## End configuration dependend stuff |
---|
40 | ################################################################# |
---|
41 | |
---|
42 | # files |
---|
43 | TEX_FILES = copyright.tex |
---|
44 | DOC2TEX_FILES = \ |
---|
45 | examples.tex general.tex math.tex reference.tex \ |
---|
46 | singular.tex start.tex types.tex pdata.tex |
---|
47 | |
---|
48 | MANUAL_FILES = ${TEX_FILES} ${DOC2TEX_FILES} |
---|
49 | TUTOR_FILES = \ |
---|
50 | tutor.tex examples.tex start.tex proc.tex copyright.tex |
---|
51 | |
---|
52 | .PHONY: info dvi ps |
---|
53 | # default target |
---|
54 | all: info dvi html |
---|
55 | |
---|
56 | # info stuff |
---|
57 | info: singular.hlp |
---|
58 | |
---|
59 | singular.hlp: ${MANUAL_FILES} |
---|
60 | - ${MAKEINFO} --no-split singular.tex |
---|
61 | |
---|
62 | # dvi stuff |
---|
63 | dvi: singular.dvi tutor.dvi usercard.dvi |
---|
64 | |
---|
65 | singular.dvi: ${MANUAL_FILES} |
---|
66 | ${TEXI2DVI} singular.tex |
---|
67 | |
---|
68 | tutor.dvi: ${TUTOR_FILES} |
---|
69 | ${TEXI2DVI} tutor.tex |
---|
70 | |
---|
71 | usercard.dvi: usercard.tex singcard.tex |
---|
72 | ${TEX} $< |
---|
73 | |
---|
74 | # postscript stuff |
---|
75 | ps: singular.ps tutor.ps usercard.ps |
---|
76 | |
---|
77 | usercard.ps: usercard.dvi |
---|
78 | ${DVIPS} -t landscape $< -o $@ |
---|
79 | |
---|
80 | %.ps: %.dvi |
---|
81 | ${DVIPS} $< -o $@ |
---|
82 | |
---|
83 | # html stuff |
---|
84 | html: ${MANUAL_FILES} |
---|
85 | test -d html || mkdir html |
---|
86 | cd html && ../texi2html -I .. -menu -expandinfo -number -split_node -verbose ../singular.tex |
---|
87 | ( cd html; \ |
---|
88 | for img in ${IMAGES}; \ |
---|
89 | do \ |
---|
90 | echo $${img}; \ |
---|
91 | uudecode ../images/$${img}.uu; \ |
---|
92 | done) |
---|
93 | touch html |
---|
94 | |
---|
95 | # how to create the texinfo files |
---|
96 | %.tex: %.doc doc2tex ${SINGULAR} |
---|
97 | @ echo |
---|
98 | @ echo "Be sure Singular is up-to-date before making the examples!" |
---|
99 | @ echo |
---|
100 | ./doc2tex ${SINGULAR} $* |
---|
101 | - grep "error occurred" $@ |
---|
102 | |
---|
103 | doc2tex: doc2tex.c |
---|
104 | $(CC) doc2tex.c -o doc2tex |
---|
105 | |
---|
106 | # targets concerned with maintenance |
---|
107 | install: singular.hlp |
---|
108 | ${MKINSTALLDIRS} ${infodir} |
---|
109 | ${INSTALL_DATA} singular.hlp ${infodir} |
---|
110 | |
---|
111 | uninstall: |
---|
112 | rm -f ${infodir}/singular.hlp |
---|
113 | - rmdir ${infodir} |
---|
114 | |
---|
115 | clean: |
---|
116 | /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt |
---|
117 | /bin/rm -f save_i test.ascii test.mp |
---|
118 | /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps |
---|
119 | /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp |
---|
120 | /bin/rm -f *.tps *.vr *.vrs |
---|
121 | /bin/rm -f doc2tex singular.hlp *.dvi *.ps ${DOC2TEX_FILES} |
---|
122 | /bin/rm -rf html |
---|
123 | |
---|
124 | mostlyclean: clean |
---|
125 | |
---|
126 | distclean: mostlyclean |
---|
127 | /bin/rm -f Makefile |
---|
128 | |
---|
129 | maintainer-clean: distclean |
---|
130 | |
---|
131 | ${SINGULAR}: |
---|
132 | # cd ..; ${MAKE} ${SINGULAR} |
---|
133 | |
---|
134 | Makefile: Makefile.in |
---|
135 | cd ..; ${MAKE} doc/Makefile |
---|
136 | |
---|
137 | html-done: ${MANUAL_FILES} |
---|
138 | |
---|