152
|
1 # |
|
2 # Makefile for octave's doc directory |
|
3 # |
|
4 # John W. Eaton |
|
5 # jwe@che.utexas.edu |
|
6 # Department of Chemical Engineering |
|
7 # The University of Texas at Austin |
|
8 |
|
9 TOPDIR = .. |
|
10 |
|
11 srcdir = @srcdir@ |
|
12 VPATH = @srcdir@ |
|
13 |
|
14 include $(TOPDIR)/Makeconf |
|
15 |
|
16 SOURCES = |
|
17 |
|
18 TEXINFO = ack.texi amuse.texi arith.texi bugs.texi bugs1.texi \ |
304
|
19 control.texi cp-idx.texi diffeq.texi expr.texi \ |
328
|
20 extend.texi fcn.texi fn-idx.texi gnuinfo.texi gpl.texi \ |
|
21 help.texi history.texi hsuser.texi in-idx.texi \ |
|
22 install.texi install1.texi intro.texi invoke.texi io.texi \ |
|
23 linalg.texi matrix.texi nonlin.texi octave.texi op-idx.texi \ |
|
24 optim.texi plot.texi program.texi quad.texi rd-idx.texi \ |
|
25 rluser.texi signal.texi special.texi stats.texi stmt.texi \ |
|
26 strings.texi system.texi var.texi vr-idx.texi |
152
|
27 |
299
|
28 LIB_TEXINFO = liboctave.texi |
|
29 |
|
30 ALL_TEXINFO = $(TEXINFO) $(LIB_TEXINFO) |
152
|
31 |
328
|
32 REFCARD = refcard.tex refcard.dvi refcard.ps |
|
33 |
304
|
34 FORMATTED = octave.dvi octave.ps octave.info octave.info-[0-9]* |
|
35 # liboctave.info liboctave.info-[0-9]* |
152
|
36 |
304
|
37 DISTFILES = Makefile.in conf.texi.in conf.texi texinfo.tex \ |
328
|
38 $(REFCARD) $(ALL_TEXINFO) $(FORMATTED) |
299
|
39 |
|
40 SPELL = $(patsubst %.texi, %.spell, $(ALL_TEXINFO)) |
152
|
41 |
|
42 %.spell : %.texi |
|
43 rm -f $@ |
|
44 sed -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp |
|
45 mv $@.tmp $@ |
|
46 |
328
|
47 all: octave.info octave.dvi octave.ps refcard.dvi refcard.ps |
304
|
48 # liboctave.info liboctave.dvi liboctave.ps |
152
|
49 .PHONY: all |
|
50 |
304
|
51 octave.info: $(TEXINFO) conf.texi |
152
|
52 -makeinfo -I$(srcdir) octave.texi |
|
53 |
304
|
54 octave.dvi: $(TEXINFO) conf.texi |
152
|
55 texi2dvi $(srcdir)/octave.texi |
|
56 |
|
57 octave.ps: octave.dvi |
|
58 dvips -o octave.ps octave.dvi |
|
59 |
304
|
60 liboctave.info: $(LIB_TEXINFO) conf.texi |
299
|
61 -makeinfo -I$(srcdir) liboctave.texi |
|
62 |
304
|
63 liboctave.dvi: $(LIB_TEXINFO) conf.texi |
299
|
64 texi2dvi $(srcdir)/liboctave.texi |
|
65 |
|
66 liboctave.ps: liboctave.dvi |
|
67 dvips -o liboctave.ps liboctave.dvi |
|
68 |
328
|
69 refcard.dvi: refcard.tex |
|
70 tex refcard.tex |
|
71 |
|
72 refcard.ps: refcard.dvi |
|
73 dvips -t landscape -o refcard.ps refcard.dvi |
|
74 |
152
|
75 ../INSTALL.OCTAVE: install1.texi install.texi |
|
76 -makeinfo --no-header -I$(srcdir)/doc install1.texi |
|
77 -mv INSTALL ../INSTALL.OCTAVE |
|
78 |
|
79 ../BUGS: bugs1.texi bugs.texi |
|
80 -makeinfo --no-header -I$(srcdir)/doc bugs1.texi |
|
81 -mv BUGS ../BUGS |
|
82 |
300
|
83 # This mess is supposed to prevent us from making info files |
|
84 # unnecessarily when building Octave in a subdirectory. |
|
85 |
299
|
86 conf.texi: $(srcdir)/../src/version.h ../Makeconf Makefile conf.texi.in |
|
87 @echo "Making conf.texi from conf.texi.in..." |
|
88 @(version_val=${version}; \ |
|
89 sed < $(srcdir)/conf.texi.in > conf.texi.tmp \ |
|
90 -e "s;%OCTAVE_VERSION%;$$version_val;" \ |
|
91 -e "s;%OCTAVE_HOME%;${prefix};") |
300
|
92 @if test "$(srcdir)" = "." ; then \ |
|
93 $(srcdir)/../src/move-if-change conf.texi.tmp conf.texi; \ |
|
94 else \ |
|
95 if cmp conf.texi.tmp $(srcdir)/conf.texi > /dev/null; then \ |
|
96 echo conf.texi is unchanged; \ |
|
97 rm -f conf.texi.tmp; \ |
|
98 else \ |
|
99 mv -f conf.texi.tmp conf.texi; \ |
|
100 fi; \ |
|
101 fi |
299
|
102 |
152
|
103 check: all |
|
104 .PHONY: check |
|
105 |
|
106 install: all |
|
107 if test -d $(infodir) ; then true ; \ |
|
108 else $(TOPDIR)/mkpath $(infodir) ; fi |
|
109 if test -d $(infodir) ; then \ |
|
110 rm -f $(infodir)/octave.info* ; \ |
|
111 if test -f octave.info ; then \ |
|
112 for f in octave.info* ; do \ |
|
113 $(INSTALL_DATA) $$f $(infodir)/$$f ; \ |
|
114 done ; \ |
|
115 else \ |
|
116 for f in $(srcdir)/octave.info* ; do \ |
|
117 $(INSTALL_DATA) $$f $(infodir)/`basename $$f` ; \ |
|
118 done ; \ |
|
119 fi ; \ |
|
120 fi |
|
121 .PHONY: install |
|
122 |
|
123 uninstall: |
299
|
124 rm -f $(infodir)/octave.info* $(infodir)/liboctave.info* |
152
|
125 .PHONY: uninstall |
|
126 |
|
127 tags: $(SOURCES) |
|
128 ctags $(SOURCES) |
|
129 |
|
130 TAGS: $(SOURCES) |
|
131 etags $(SOURCES) |
|
132 |
|
133 spell: $(SPELL) |
|
134 .PHONY: spell |
|
135 |
|
136 clean: |
|
137 rm -f *.info *.info-* octave.cp octave.fn octave.ky \ |
301
|
138 octave.op octave.pg octave.tp octave.vr octave.cps \ |
|
139 octave.fns octave.kys octave.ops octave.pgs octave.tps \ |
|
140 octave.vrs octave.aux octave.log octave.toc octave.dvi \ |
|
141 octave.ps liboctave.cp liboctave.fn liboctave.pg \ |
|
142 liboctave.tp liboctave.cps liboctave.fns liboctave.pgs \ |
|
143 liboctave.tps liboctave.aux liboctave.log liboctave.toc \ |
328
|
144 liboctave.dvi liboctave.ps refcard.dvi refcard.ps |
152
|
145 .PHONY: clean |
|
146 |
|
147 mostlyclean: |
|
148 rm -f *.info *.info-* |
|
149 .PHONY: mostlyclean |
|
150 |
|
151 distclean: clean |
|
152 rm -f Makefile |
|
153 .PHONY: distclean |
|
154 |
|
155 realclean: distclean |
|
156 rm -f tags TAGS |
|
157 .PHONY: realclean |
|
158 |
|
159 local-dist: all |
|
160 ln $(DISTFILES) ../`cat ../.fname`/doc |
|
161 .PHONY: local-dist |
|
162 |
|
163 dist: all |
|
164 ln $(DISTFILES) ../`cat ../.fname`/doc |
|
165 .PHONY: dist |
|
166 |
|
167 doc-dist: all |
|
168 ln $(FORMATTED) ../`cat ../.fname`/doc |
|
169 .PHONY: doc-dist |