152
|
1 # |
2000
|
2 # Makefile for octave's doc/interpreter directory |
152
|
3 # |
|
4 # John W. Eaton |
1452
|
5 # jwe@bevo.che.wisc.edu |
|
6 # University of Wisconsin-Madison |
152
|
7 # Department of Chemical Engineering |
|
8 |
2000
|
9 TOPDIR = ../.. |
152
|
10 |
|
11 srcdir = @srcdir@ |
411
|
12 top_srcdir = @top_srcdir@ |
152
|
13 VPATH = @srcdir@ |
|
14 |
|
15 include $(TOPDIR)/Makeconf |
|
16 |
651
|
17 INSTALL = @INSTALL@ |
|
18 INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
|
19 INSTALL_DATA = @INSTALL_DATA@ |
|
20 |
3297
|
21 MAIN_SOURCE := octave.txi |
|
22 |
|
23 SUB_SOURCE := arith.txi audio.txi basics.txi bugs.txi control.txi \ |
3294
|
24 cp-idx.txi data.txi diffeq.txi emacs.txi errors.txi \ |
|
25 eval.txi expr.txi fn-idx.txi func.txi gpl.txi \ |
|
26 grammar.txi image.txi install.txi intro.txi io.txi \ |
|
27 linalg.txi matrix.txi nonlin.txi numbers.txi octave.txi \ |
|
28 op-idx.txi optim.txi plot.txi poly.txi preface.txi \ |
|
29 quad.txi set.txi signal.txi stats.txi stmt.txi \ |
|
30 strings.txi struct.txi system.txi tips.txi var.txi \ |
|
31 vr-idx.txi |
152
|
32 |
3297
|
33 SOURCES := $(MAIN_SOURCE) $(SUB_SOURCE) |
3294
|
34 |
3297
|
35 MAIN_TEXINFO := $(MAIN_SOURCE:.txi=.texi) |
|
36 |
|
37 SUB_TEXINFO := $(SUB_SOURCE:.txi=.texi) |
|
38 |
|
39 TEXINFO := $(MAIN_TEXINFO) $(SUB_TEXINFO) |
152
|
40 |
3189
|
41 FORMATTED = octave.dvi octave.ps octave.info octave.info-[0-9]* octave_*.html |
328
|
42 |
3294
|
43 DISTFILES = Makefile.in dir octave.1 $(SOURCES) $(TEXINFO) $(FORMATTED) |
299
|
44 |
2624
|
45 ifeq ($(wildcard octave.info), ) |
3069
|
46 BINDISTFILES = $(addprefix $(srcdir)/, octave.1 $(FORMATTED)) |
2624
|
47 else |
3069
|
48 BINDISTFILES = $(srcdir)/octave.1 $(FORMATTED) |
2624
|
49 endif |
|
50 |
|
51 # Look for version.h to get version information. |
|
52 xfiles := $(TOPDIR)/src/version.h $(srcdir)/$(TOPDIR)/src/version.h |
|
53 |
|
54 version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file)))) |
|
55 |
2689
|
56 SPELL = $(patsubst %.texi, %.spell, $(TEXINFO)) |
152
|
57 |
|
58 %.spell : %.texi |
|
59 rm -f $@ |
|
60 sed -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp |
|
61 mv $@.tmp $@ |
|
62 |
3189
|
63 all: octave.info octave.dvi octave.ps octave_toc.html |
152
|
64 .PHONY: all |
|
65 |
3297
|
66 DOCSTRINGS = $(TOPDIR)/src/DOCSTRINGS $(TOPDIR)/scripts/DOCSTRINGS |
|
67 |
|
68 $(TEXINFO): $(DOCSTRINGS) munge-texi |
|
69 |
|
70 # Kluge: if the DOCSTRING files are present, assume they are current. |
|
71 $(DOCSTRINGS): |
|
72 $(MAKE) -C $(dir $@) $(notdir $@) |
3294
|
73 |
|
74 %.texi : %.txi |
|
75 ./munge-texi \ |
|
76 -d $(TOPDIR)/src/DOCSTRINGS \ |
|
77 -d $(TOPDIR)/scripts/DOCSTRINGS < $< > $@.t |
|
78 $(top_srcdir)/move-if-change $@.t $@ |
|
79 |
3297
|
80 octave.info: $(MAIN_TEXINFO) $(SUB_TEXINFO) ../conf.texi |
|
81 -makeinfo -I$(srcdir) -I$(srcdir)/.. $< |
2000
|
82 |
3297
|
83 octave.dvi: $(MAIN_TEXINFO) $(SUB_TEXINFO) ../conf.texi |
3028
|
84 -TEXINPUTS="$(srcdir):$(srcdir)/..:$(TEXINPUTS):"; \ |
|
85 export TEXINPUTS; \ |
3297
|
86 $(TEXI2DVI) $< |
2000
|
87 |
|
88 octave.ps: octave.dvi |
|
89 -dvips -o octave.ps octave.dvi |
|
90 |
2627
|
91 ../../INSTALL.OCTAVE: install.texi |
3176
|
92 rm -f INSTALL |
|
93 -makeinfo -D INSTALLONLY \ |
|
94 --no-validate --no-headers --no-split --output INSTALL \ |
3297
|
95 -I$(srcdir) -I$(srcdir)/.. $< |
2001
|
96 mv INSTALL ../../INSTALL.OCTAVE |
2000
|
97 |
2627
|
98 ../../BUGS: bugs.texi |
3176
|
99 rm -f BUGS |
|
100 -makeinfo -D BUGSONLY \ |
|
101 --no-validate --no-headers --no-split --output BUGS \ |
3297
|
102 -I$(srcdir) -I$(srcdir)/.. $< |
2001
|
103 mv BUGS ../../BUGS |
2000
|
104 |
3297
|
105 octave_toc.html: $(MAIN_TEXINFO) $(SUB_TEXINFO) |
|
106 -texi2html -expandinfo -split_chapter -I$(srcdir)/.. $< |
3189
|
107 |
152
|
108 check: all |
|
109 .PHONY: check |
|
110 |
2811
|
111 install install-strip: all |
2222
|
112 $(top_srcdir)/mkinstalldirs $(man1dir) $(infodir) |
3028
|
113 @if test -d $(man1dir); then \ |
|
114 rm -f $(man1dir)/octave$(man1ext); \ |
|
115 echo "installing $(srcdir)/octave.1 in $(man1dir)"; \ |
|
116 $(INSTALL_DATA) $(srcdir)/octave.1 $(man1dir)/octave$(man1ext); \ |
979
|
117 fi |
3028
|
118 @if test -d $(infodir); then \ |
|
119 rm -f $(infodir)/octave.info*; \ |
|
120 echo "installing info files in $(infodir)"; \ |
|
121 if test -f octave.info; then \ |
|
122 for f in octave.info*; do \ |
|
123 $(INSTALL_DATA) $$f $(infodir)/$$f; \ |
|
124 done; \ |
152
|
125 else \ |
3028
|
126 for f in $(srcdir)/octave.info*; do \ |
|
127 $(INSTALL_DATA) $$f $(infodir)/`basename $$f`; \ |
|
128 done; \ |
|
129 fi; \ |
|
130 if test -f $(infodir)/dir; then \ |
|
131 if grep "^\* Octave: (octave)." $(infodir)/dir > /dev/null; then \ |
|
132 true; \ |
980
|
133 else \ |
3028
|
134 echo ""; \ |
|
135 echo "You should add the following entry"; \ |
|
136 echo ""; \ |
|
137 echo "* Octave: (octave)."; \ |
|
138 echo " Interactive language for numerical computations."; \ |
|
139 echo ""; \ |
|
140 echo "to $(infodir)/dir."; \ |
|
141 echo ""; \ |
|
142 fi; \ |
976
|
143 else \ |
3028
|
144 echo "installing $(srcdir)/dir in $(infodir)"; \ |
|
145 $(INSTALL_DATA) $(srcdir)/dir $(infodir)/dir; \ |
|
146 fi; \ |
152
|
147 fi |
2811
|
148 .PHONY: install install-strip |
152
|
149 |
|
150 uninstall: |
2222
|
151 rm -f $(infodir)/octave.info* $(man1dir)/octave$(man1ext) |
152
|
152 .PHONY: uninstall |
|
153 |
|
154 tags: $(SOURCES) |
|
155 ctags $(SOURCES) |
|
156 |
|
157 TAGS: $(SOURCES) |
|
158 etags $(SOURCES) |
|
159 |
|
160 spell: $(SPELL) |
|
161 .PHONY: spell |
|
162 |
1458
|
163 mostlyclean clean: |
|
164 rm -f octave.cp octave.fn octave.in \ |
349
|
165 octave.ky octave.op octave.pg octave.rd octave.tp octave.vr \ |
|
166 octave.cps octave.fns octave.ins octave.kys octave.ops \ |
|
167 octave.pgs octave.rds octave.tps octave.vrs octave.aux \ |
2000
|
168 octave.log octave.toc |
1458
|
169 .PHONY: mostlyclean clean |
152
|
170 |
|
171 distclean: clean |
1039
|
172 rm -f Makefile |
152
|
173 .PHONY: distclean |
|
174 |
1391
|
175 maintainer-clean: distclean |
3189
|
176 rm -f tags TAGS octave.info octave.info-* octave.dvi octave.ps |
|
177 rm -f octave_*.html |
1391
|
178 .PHONY: maintainer-clean |
152
|
179 |
|
180 dist: all |
2028
|
181 ln $(DISTFILES) ../../`cat ../../.fname`/doc/interpreter |
152
|
182 .PHONY: dist |
2624
|
183 |
|
184 bin-dist: |
|
185 if [ -n "$(BINDISTFILES)" ]; then \ |
3028
|
186 ln $(BINDISTFILES) ../../`cat ../../.fname`/doc/interpreter; \ |
2624
|
187 fi |
|
188 .PHONY: bin-dist |