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 |
152
|
21 SOURCES = |
|
22 |
2670
|
23 TEXINFO = arith.texi audio.texi basics.texi bugs.texi control.texi \ |
|
24 cp-idx.texi data.texi diffeq.texi emacs.texi errors.texi \ |
|
25 eval.texi expr.texi fn-idx.texi func.texi gpl.texi \ |
|
26 grammar.texi image.texi install.texi intro.texi io.texi \ |
|
27 linalg.texi matrix.texi nonlin.texi numbers.texi octave.texi \ |
|
28 op-idx.texi optim.texi plot.texi poly.texi preface.texi \ |
|
29 quad.texi set.texi signal.texi stats.texi stmt.texi \ |
|
30 strings.texi struct.texi system.texi tips.texi var.texi \ |
|
31 vr-idx.texi |
152
|
32 |
2698
|
33 FORMATTED = octave.dvi octave.ps octave.info octave.info-[0-9]* |
328
|
34 |
2701
|
35 DISTFILES = Makefile.in dir octave.1 $(TEXINFO) $(FORMATTED) |
299
|
36 |
2624
|
37 ifeq ($(wildcard octave.info), ) |
|
38 BINDISTFILES = $(srcdir)/octave.1 $(srcdir)/octave.info \ |
|
39 $(wildcard $(srcdir)/octave.info-[0-9]*) |
|
40 else |
|
41 BINDISTFILES = $(srcdir)/octave.1 octave.info octave.info-[0-9]* |
|
42 endif |
|
43 |
|
44 # Look for version.h to get version information. |
|
45 xfiles := $(TOPDIR)/src/version.h $(srcdir)/$(TOPDIR)/src/version.h |
|
46 |
|
47 version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file)))) |
|
48 |
2689
|
49 SPELL = $(patsubst %.texi, %.spell, $(TEXINFO)) |
152
|
50 |
|
51 %.spell : %.texi |
|
52 rm -f $@ |
|
53 sed -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp |
|
54 mv $@.tmp $@ |
|
55 |
2701
|
56 all: octave.info octave.dvi octave.ps |
152
|
57 .PHONY: all |
|
58 |
2701
|
59 octave.info: $(TEXINFO) ../conf.texi |
2705
|
60 -makeinfo -I$(srcdir) -I$(srcdir)/.. $(srcdir)/octave.texi |
2000
|
61 |
2701
|
62 octave.dvi: $(TEXINFO) ../conf.texi |
2000
|
63 -TEXINPUTS="$(srcdir):$(srcdir)/..:$(TEXINPUTS):" ; \ |
|
64 export TEXINPUTS ; \ |
2518
|
65 $(TEXI2DVI) $(srcdir)/octave.texi |
2000
|
66 |
|
67 octave.ps: octave.dvi |
|
68 -dvips -o octave.ps octave.dvi |
|
69 |
2627
|
70 ../../INSTALL.OCTAVE: install.texi |
|
71 -makeinfo -D INSTALLONLY --no-headers --no-split --output INSTALL \ |
2705
|
72 -I$(srcdir) -I$(srcdir)/.. $(srcdir)/install.texi |
2001
|
73 mv INSTALL ../../INSTALL.OCTAVE |
2000
|
74 |
2627
|
75 ../../BUGS: bugs.texi |
|
76 -makeinfo -D BUGSONLY --no-headers --no-split --output BUGS \ |
2705
|
77 -I$(srcdir) -I$(srcdir)/.. $(srcdir)/bugs.texi |
2001
|
78 mv BUGS ../../BUGS |
2000
|
79 |
152
|
80 check: all |
|
81 .PHONY: check |
|
82 |
2811
|
83 install install-strip: all |
2222
|
84 $(top_srcdir)/mkinstalldirs $(man1dir) $(infodir) |
|
85 @if test -d $(man1dir) ; then \ |
|
86 rm -f $(man1dir)/octave$(man1ext) ; \ |
|
87 echo "installing $(srcdir)/octave.1 in $(man1dir)" ; \ |
|
88 $(INSTALL_DATA) $(srcdir)/octave.1 $(man1dir)/octave$(man1ext) ; \ |
979
|
89 fi |
977
|
90 @if test -d $(infodir) ; then \ |
152
|
91 rm -f $(infodir)/octave.info* ; \ |
979
|
92 echo "installing info files in $(infodir)" ; \ |
152
|
93 if test -f octave.info ; then \ |
|
94 for f in octave.info* ; do \ |
|
95 $(INSTALL_DATA) $$f $(infodir)/$$f ; \ |
|
96 done ; \ |
|
97 else \ |
|
98 for f in $(srcdir)/octave.info* ; do \ |
|
99 $(INSTALL_DATA) $$f $(infodir)/`basename $$f` ; \ |
|
100 done ; \ |
|
101 fi ; \ |
976
|
102 if test -f $(infodir)/dir ; then \ |
980
|
103 if grep "^\* Octave: (octave)." $(infodir)/dir > /dev/null ; then \ |
|
104 true ; \ |
|
105 else \ |
|
106 echo "" ; \ |
|
107 echo "You should add the following entry" ; \ |
|
108 echo "" ; \ |
|
109 echo "* Octave: (octave)." ; \ |
|
110 echo " Interactive language for numerical computations." ; \ |
|
111 echo "" ; \ |
|
112 echo "to $(infodir)/dir." ; \ |
|
113 echo "" ; \ |
|
114 fi ; \ |
976
|
115 else \ |
978
|
116 echo "installing $(srcdir)/dir in $(infodir)" ; \ |
976
|
117 $(INSTALL_DATA) $(srcdir)/dir $(infodir)/dir ; \ |
|
118 fi ; \ |
152
|
119 fi |
2811
|
120 .PHONY: install install-strip |
152
|
121 |
|
122 uninstall: |
2222
|
123 rm -f $(infodir)/octave.info* $(man1dir)/octave$(man1ext) |
152
|
124 .PHONY: uninstall |
|
125 |
|
126 tags: $(SOURCES) |
|
127 ctags $(SOURCES) |
|
128 |
|
129 TAGS: $(SOURCES) |
|
130 etags $(SOURCES) |
|
131 |
|
132 spell: $(SPELL) |
|
133 .PHONY: spell |
|
134 |
1458
|
135 mostlyclean clean: |
|
136 rm -f octave.cp octave.fn octave.in \ |
349
|
137 octave.ky octave.op octave.pg octave.rd octave.tp octave.vr \ |
|
138 octave.cps octave.fns octave.ins octave.kys octave.ops \ |
|
139 octave.pgs octave.rds octave.tps octave.vrs octave.aux \ |
2000
|
140 octave.log octave.toc |
1458
|
141 .PHONY: mostlyclean clean |
152
|
142 |
|
143 distclean: clean |
1039
|
144 rm -f Makefile |
152
|
145 .PHONY: distclean |
|
146 |
1391
|
147 maintainer-clean: distclean |
1458
|
148 rm -f tags TAGS octave.info octave.info-* octave.dvi octave.ps \ |
1391
|
149 .PHONY: maintainer-clean |
152
|
150 |
|
151 dist: all |
2028
|
152 ln $(DISTFILES) ../../`cat ../../.fname`/doc/interpreter |
152
|
153 .PHONY: dist |
2624
|
154 |
|
155 bin-dist: |
|
156 if [ -n "$(BINDISTFILES)" ]; then \ |
|
157 ln $(BINDISTFILES) ../../`cat ../../.fname`/doc/interpreter ; \ |
|
158 fi |
|
159 .PHONY: bin-dist |