174
|
1 # Makefile for Octave's info directory. Adapted from the makefile for |
|
2 # texinfo/info. |
|
3 # |
655
|
4 # Copyright (C) 1993, 1994 Free Software Foundation, Inc. |
174
|
5 # |
171
|
6 # This program is free software; you can redistribute it and/or modify |
|
7 # it under the terms of the GNU General Public License as published by |
|
8 # the Free Software Foundation; either version 2, or (at your option) |
|
9 # any later version. |
174
|
10 # |
171
|
11 # This program is distributed in the hope that it will be useful, |
|
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 # GNU General Public License for more details. |
174
|
15 # |
171
|
16 # You should have received a copy of the GNU General Public License |
|
17 # along with this program; if not, write to the Free Software |
|
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|
19 |
|
20 #### Start of system configuration section. #### |
|
21 |
173
|
22 TOPDIR = .. |
171
|
23 |
411
|
24 srcdir = @srcdir@ |
|
25 top_srcdir = @top_srcdir@ |
|
26 VPATH = @srcdir@:@srcdir@/../src |
171
|
27 |
411
|
28 include $(TOPDIR)/Makeconf |
171
|
29 |
655
|
30 INSTALL = @INSTALL@ |
|
31 INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
|
32 INSTALL_DATA = @INSTALL_DATA@ |
|
33 |
173
|
34 common = @srcdir@/../src |
171
|
35 |
173
|
36 MAKEINFO= makeinfo |
171
|
37 |
|
38 LDEFS = -DNAMED_FUNCTIONS=1 -DDEFAULT_INFOPATH='"$(DEFAULT_INFOPATH)"' |
|
39 |
|
40 TERMLIBS = @TERMLIBS@ |
173
|
41 LIBS = $(TERMLIBS) @LIBS@ |
171
|
42 LOADLIBES = $(LIBS) |
|
43 |
|
44 SHELL = /bin/sh |
|
45 |
|
46 #### End of system configuration section. #### |
|
47 |
174
|
48 SOURCES = dir.c display.c echo_area.c filesys.c info-utils.c info.c \ |
|
49 infodoc.c infomap.c m-x.c nodes.c search.c session.c \ |
|
50 signals.c terminal.c tilde.c window.c xmalloc.c indices.c \ |
|
51 makedoc.c nodemenu.c footnotes.c dribble.c variables.c gc.c \ |
173
|
52 error.c |
171
|
53 |
249
|
54 INCLUDES = display.h doc.h echo_area.h filesys.h general.h \ |
174
|
55 info-utils.h info.h infomap.h nodes.h search.h session.h \ |
|
56 signals.h termdep.h terminal.h tilde.h indices.h window.h \ |
|
57 footnotes.h dribble.h variables.h gc.h |
171
|
58 |
174
|
59 TEXI = info-stnd.texi info.texi userdoc.texi |
|
60 |
|
61 DISTFILES = Makefile.in README NEWS info.1 \ |
|
62 $(SOURCES) $(INCLUDES) $(TEXINFO) |
173
|
63 |
|
64 GETOPT_OBJS = getopt.o getopt1.o |
|
65 |
|
66 LIBOBJS = dir.o display.o doc.o echo_area.o filesys.o info-utils.o \ |
171
|
67 infodoc.o infomap.o m-x.o nodes.o search.o session.o signals.o \ |
|
68 terminal.o tilde.o window.o indices.o xmalloc.o nodemenu.o \ |
173
|
69 footnotes.o dribble.o variables.o gc.o error.o |
|
70 |
174
|
71 OBJECTS = info.o $(LIBOBJS) $(GETOPT_OBJS) |
171
|
72 |
|
73 # The names of files which declare info commands. |
|
74 CMDFILES = $(srcdir)/session.c $(srcdir)/echo_area.c $(srcdir)/infodoc.c \ |
|
75 $(srcdir)/m-x.c $(srcdir)/indices.c $(srcdir)/nodemenu.c \ |
|
76 $(srcdir)/footnotes.c $(srcdir)/variables.c |
|
77 |
|
78 # The name of the program which builds documentation structure from CMDFILES. |
|
79 MAKEDOC_OBJECTS = makedoc.o xmalloc.o |
|
80 MAKEDOC_SOURCE = makedoc.c xmalloc.c |
|
81 |
759
|
82 all: libinfo.a # info.info info-stnd.info |
174
|
83 .PHONY: all |
|
84 |
171
|
85 sub-all: all |
174
|
86 .PHONY: sub-all |
171
|
87 |
|
88 install: all |
174
|
89 # $(INSTALL_PROGRAM) info $(datadir)/info |
173
|
90 # -d=$(srcdir); test -f ./info.info && d=.; \ |
|
91 # $(INSTALL_DATA) $$d/info.info $(infodir)/info.info |
|
92 # -d=$(srcdir); test -f ./info-stnd.info && d=.; \ |
|
93 # $(INSTALL_DATA) $$d/info-stnd.info $(infodir)/info-stnd.info |
|
94 # -$(INSTALL_DATA) $(srcdir)/info.1 $(mandir)/info.$(manext) |
174
|
95 .PHONY: install |
171
|
96 |
|
97 uninstall: |
174
|
98 # rm -f $(datadir)/info |
173
|
99 # rm -f $(infodir)/info.info |
|
100 # rm -f $(infodir)/info-stnd.info |
|
101 # rm -f $(mandir)/info.$(manext) |
174
|
102 .PHONY: uninstall |
171
|
103 |
759
|
104 libinfo.a: $(LIBOBJS) |
|
105 $(AR) $(ARFLAGS) libinfo.a $(LIBOBJS) |
|
106 $(RANLIB) libinfo.a |
173
|
107 |
174
|
108 info: $(OBJECTS) |
|
109 $(CC) $(LDFLAGS) -o info $(OBJECTS) $(LOADLIBES) |
171
|
110 |
|
111 info.info: info.texi |
|
112 $(MAKEINFO) --no-split -I$(srcdir) info.texi |
|
113 |
|
114 info-stnd.info: info-stnd.texi |
|
115 $(MAKEINFO) --no-split -I$(srcdir) info-stnd.texi |
|
116 |
173
|
117 makedoc: $(MAKEDOC_OBJECTS) |
171
|
118 $(CC) $(LDFLAGS) -o makedoc $(MAKEDOC_OBJECTS) $(LOADLIBES) |
|
119 |
|
120 clean: |
174
|
121 rm -f info funs.h doc.c makedoc $(OBJECTS) $(MAKEDOC_OBJECTS) |
171
|
122 |
|
123 distclean: clean texclean |
|
124 rm -f Makefile config.status *~ core core.* *.BAK TAGS |
|
125 |
|
126 mostlyclean: clean |
|
127 |
|
128 realclean: distclean |
|
129 rm -f funs.h doc.c |
|
130 rm -f info.info info-stnd.info |
|
131 |
173
|
132 local-dist: |
|
133 ln $(DISTFILES) ../`cat ../.fname`/info |
|
134 .PHONY: local-dist |
|
135 |
|
136 dist: |
|
137 ln $(DISTFILES) ../`cat ../.fname`/info |
|
138 .PHONY: dist |
|
139 |
174
|
140 TAGS: $(SOURCES) makedoc-TAGS |
|
141 etags $(SOURCES) |
171
|
142 cat makedoc-TAGS >>TAGS && rm -f makedoc-TAGS |
|
143 |
|
144 makedoc-TAGS: $(CMDFILES) |
|
145 ./makedoc -tags $(CMDFILES) >makedoc-TAGS |
|
146 |
|
147 texclean: |
|
148 rm -f *.toc *.aux *.log *.cp *.fn *.tp *.vr *.pg *.ky *.cps \ |
|
149 *.tps *.fns *.kys *.pgs *.vrs |
|
150 |
|
151 check: info |
|
152 |
|
153 # The files `doc.c' and `funs.h' are created by ./makedoc run over the source |
|
154 # files which contain DECLARE_INFO_COMMAND. `funs.h' is a header file |
|
155 # listing the functions found. `doc.c' is a structure containing pointers |
|
156 # to those functions along with completable names and documentation strings. |
|
157 funs.h: makedoc $(CMDFILES) |
|
158 -@if test -f funs.h; then mv -f funs.h old-funs.h; fi; : |
|
159 -@if test -f doc.c; then mv -f doc.c old-doc.c; fi; : |
|
160 ./makedoc $(CMDFILES) |
|
161 -@if cmp -s old-funs.h funs.h; then mv old-funs.h funs.h; \ |
|
162 else rm -f old-funs.h; fi; : |
|
163 -@if cmp -s old-doc.c doc.c; then mv old-doc.c doc.c; \ |
|
164 else rm -f old-doc.c; fi; : |
|
165 |
|
166 doc.c: funs.h |
|
167 dribble.o: dribble.c dribble.h |
|
168 display.o: display.c |
|
169 echo_area.o: echo_area.c |
|
170 filesys.o: filesys.c |
|
171 info-utils.o: info-utils.c |
|
172 info.o: info.c |
|
173 infodoc.o: infodoc.c |
|
174 infomap.o: infomap.c |
|
175 m-x.o: m-x.c |
|
176 nodes.o: nodes.c |
|
177 search.o: search.c |
|
178 session.o: session.c |
|
179 signals.o: signals.c |
|
180 terminal.o: terminal.c |
|
181 tilde.o: tilde.c |
|
182 window.o: window.c |
|
183 xmalloc.o: xmalloc.c |
|
184 indices.o: indices.c |
|
185 makedoc.o: makedoc.c |
|
186 |
|
187 dir.o: dir.c |
|
188 display.o: nodes.h info-utils.h search.h |
|
189 display.o: terminal.h window.h display.h |
|
190 echo_area.o: info.h |
|
191 filesys.o: general.h tilde.h filesys.h |
|
192 footnotes.o: footnotes.h |
|
193 info-utils.o: info-utils.h nodes.h search.h |
|
194 info.o: info.h $(common)/getopt.h |
|
195 infodoc.o: info.h doc.h |
|
196 infomap.o: infomap.h funs.h |
|
197 gc.o: info.h |
|
198 m-x.o: info.h |
|
199 nodes.o: search.h filesys.h |
|
200 nodes.o: nodes.h info-utils.h |
|
201 search.o: general.h search.h nodes.h |
|
202 session.o: info.h |
|
203 signals.o: info.h signals.h |
|
204 terminal.o: terminal.h termdep.h |
|
205 tilde.o: tilde.h |
|
206 variables.c: variables.h |
|
207 window.o: nodes.h window.h display.h |
|
208 window.o: info-utils.h search.h infomap.h |
|
209 |
|
210 # Prevent GNU make v3 from overflowing arg limit on SysV. |
|
211 .NOEXPORT: |
|
212 |
|
213 # eof |