binutils doc update
[deliverable/binutils-gdb.git] / bfd / doc / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2 #
3 # Copyright 2012 Free Software Foundation
4 #
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
18 #
19
20 AUTOMAKE_OPTIONS = 1.9 cygnus
21
22 DOCFILES = aoutx.texi archive.texi archures.texi \
23 bfdt.texi cache.texi coffcode.texi \
24 core.texi elf.texi elfcode.texi format.texi \
25 libbfd.texi bfdwin.texi bfdio.texi \
26 opncls.texi reloc.texi section.texi \
27 syms.texi targets.texi init.texi hash.texi linker.texi \
28 mmo.texi \
29 bfdver.texi
30
31 PROTOS = archive.p archures.p bfd.p \
32 core.p format.p \
33 bfdio.p bfdwin.p \
34 libbfd.p opncls.p reloc.p \
35 section.p syms.p targets.p \
36 format.p core.p init.p
37
38 IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
39
40 # SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
41 # between VPATH and suffix rules. If you use GNU Make, perhaps other Makes,
42 # you don't need these three:
43 SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
44 $(srcdir)/../archures.c $(srcdir)/../bfd.c \
45 $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
46 $(srcdir)/../cache.c $(srcdir)/../coffcode.h \
47 $(srcdir)/../corefile.c $(srcdir)/../elf.c \
48 $(srcdir)/../elfcode.h $(srcdir)/../format.c \
49 $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
50 $(srcdir)/../reloc.c $(srcdir)/../section.c \
51 $(srcdir)/../syms.c $(srcdir)/../targets.c \
52 $(srcdir)/../hash.c $(srcdir)/../linker.c \
53 $(srcdir)/../mmo.c
54
55 SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
56 $(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
57 $(srcdir)/../format.c $(srcdir)/../libbfd.c \
58 $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
59 $(srcdir)/../opncls.c $(srcdir)/../reloc.c \
60 $(srcdir)/../section.c $(srcdir)/../syms.c \
61 $(srcdir)/../targets.c $(srcdir)/../init.c
62
63 SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
64 $(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
65 $(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
66 $(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
67 $(srcdir)/../init.c
68
69 TEXIDIR = $(srcdir)/../../texinfo/fsf
70
71 info_TEXINFOS = bfd.texinfo
72 bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi
73
74 MKDOC = chew$(EXEEXT_FOR_BUILD)
75
76 AM_CPPFLAGS = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
77 -I$(srcdir)/../../intl -I../../intl
78
79 $(MKDOC): $(srcdir)/chew.c
80 $(CC_FOR_BUILD) -o chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
81 $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \
82 $(SHELL) $(srcdir)/../../move-if-change chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC)
83
84 protos: libbfd.h libcoff.h bfd.h
85
86 # We can't replace these rules with an implicit rule, because
87 # makes without VPATH support couldn't find the .h files in `..'.
88
89 # We do not depend on chew directly so that we can distribute the info
90 # files, and permit people to rebuild them, without requiring the makeinfo
91 # program. If somebody tries to rebuild info, but none of the .texi files
92 # have changed, then nothing will be rebuilt.
93
94 aoutx.texi: chew.c $(srcdir)/../aoutx.h $(srcdir)/doc.str
95 $(MAKE) $(MKDOC)
96 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
97 $(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
98
99 archive.texi: chew.c $(srcdir)/../archive.c $(srcdir)/doc.str
100 $(MAKE) $(MKDOC)
101 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
102 $(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
103
104 archures.texi: chew.c $(srcdir)/../archures.c $(srcdir)/doc.str
105 $(MAKE) $(MKDOC)
106 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
107 $(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
108
109 # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
110 # bfd.texinfo on an 8.3 filesystem.
111 bfdt.texi: chew.c $(srcdir)/../bfd.c $(srcdir)/doc.str
112 $(MAKE) $(MKDOC)
113 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
114 $(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
115
116 cache.texi: chew.c $(srcdir)/../cache.c $(srcdir)/doc.str
117 $(MAKE) $(MKDOC)
118 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
119 $(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
120
121 coffcode.texi: chew.c $(srcdir)/../coffcode.h $(srcdir)/doc.str
122 $(MAKE) $(MKDOC)
123 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
124 $(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
125
126 core.texi: chew.c $(srcdir)/../corefile.c $(srcdir)/doc.str
127 $(MAKE) $(MKDOC)
128 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
129 $(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
130
131 elf.texi: chew.c $(srcdir)/../elf.c $(srcdir)/doc.str
132 $(MAKE) $(MKDOC)
133 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
134 $(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
135
136 elfcode.texi: chew.c $(srcdir)/../elfcode.h $(srcdir)/doc.str
137 $(MAKE) $(MKDOC)
138 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
139 $(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
140
141 mmo.texi: chew.c $(srcdir)/../mmo.c $(srcdir)/doc.str
142 $(MAKE) $(MKDOC)
143 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
144 $(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
145
146 format.texi: chew.c $(srcdir)/../format.c $(srcdir)/doc.str
147 $(MAKE) $(MKDOC)
148 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
149 $(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
150
151 libbfd.texi: chew.c $(srcdir)/../libbfd.c $(srcdir)/doc.str
152 $(MAKE) $(MKDOC)
153 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
154 $(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
155
156 bfdio.texi: chew.c $(srcdir)/../bfdio.c $(srcdir)/doc.str
157 $(MAKE) $(MKDOC)
158 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
159 $(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
160
161 bfdwin.texi: chew.c $(srcdir)/../bfdwin.c $(srcdir)/doc.str
162 $(MAKE) $(MKDOC)
163 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
164 $(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
165
166 opncls.texi: chew.c $(srcdir)/../opncls.c $(srcdir)/doc.str
167 $(MAKE) $(MKDOC)
168 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
169 $(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
170
171 reloc.texi: chew.c $(srcdir)/../reloc.c $(srcdir)/doc.str
172 $(MAKE) $(MKDOC)
173 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
174 $(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi
175
176 section.texi: chew.c $(srcdir)/../section.c $(srcdir)/doc.str
177 $(MAKE) $(MKDOC)
178 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
179 $(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
180
181 syms.texi: chew.c $(srcdir)/../syms.c $(srcdir)/doc.str
182 $(MAKE) $(MKDOC)
183 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
184 $(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
185
186 targets.texi: chew.c $(srcdir)/../targets.c $(srcdir)/doc.str
187 $(MAKE) $(MKDOC)
188 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
189 $(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
190
191 init.texi: chew.c $(srcdir)/../init.c $(srcdir)/doc.str
192 $(MAKE) $(MKDOC)
193 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
194 $(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
195
196 hash.texi: chew.c $(srcdir)/../hash.c $(srcdir)/doc.str
197 $(MAKE) $(MKDOC)
198 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
199 $(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
200
201 linker.texi: chew.c $(srcdir)/../linker.c $(srcdir)/doc.str
202 $(MAKE) $(MKDOC)
203 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
204 $(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
205
206 LIBBFD_H_DEP = \
207 $(srcdir)/../libbfd-in.h \
208 $(srcdir)/../init.c \
209 $(srcdir)/../libbfd.c \
210 $(srcdir)/../bfdio.c \
211 $(srcdir)/../bfdwin.c \
212 $(srcdir)/../cache.c \
213 $(srcdir)/../reloc.c \
214 $(srcdir)/../archures.c \
215 $(srcdir)/../elf.c \
216 $(srcdir)/header.sed \
217 $(srcdir)/proto.str \
218 $(MKDOC)
219
220 libbfd.h: $(LIBBFD_H_DEP)
221 echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
222 for file in $(LIBBFD_H_DEP); do \
223 case $$file in \
224 *-in.h) cat $$file >> $@ ;; \
225 */header.sed) break ;; \
226 *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
227 -e 's,$$,. */,' >> $@ ; \
228 ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
229 esac; \
230 done
231
232 LIBCOFF_H_DEP = \
233 $(srcdir)/../libcoff-in.h \
234 $(srcdir)/../coffcode.h \
235 $(srcdir)/header.sed \
236 $(srcdir)/proto.str \
237 $(MKDOC)
238
239 libcoff.h: $(LIBCOFF_H_DEP)
240 echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@
241 for file in $(LIBCOFF_H_DEP); do \
242 case $$file in \
243 *-in.h) cat $$file >> $@ ;; \
244 */header.sed) break ;; \
245 *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
246 -e 's,$$,. */,' >> $@ ; \
247 ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
248 esac; \
249 done
250
251 BFD_H_DEP = \
252 $(srcdir)/../bfd-in.h \
253 $(srcdir)/../init.c \
254 $(srcdir)/../opncls.c \
255 $(srcdir)/../libbfd.c \
256 $(srcdir)/../bfdio.c \
257 $(srcdir)/../bfdwin.c \
258 $(srcdir)/../section.c \
259 $(srcdir)/../archures.c \
260 $(srcdir)/../reloc.c \
261 $(srcdir)/../syms.c \
262 $(srcdir)/../bfd.c \
263 $(srcdir)/../archive.c \
264 $(srcdir)/../corefile.c \
265 $(srcdir)/../targets.c \
266 $(srcdir)/../format.c \
267 $(srcdir)/../linker.c \
268 $(srcdir)/../simple.c \
269 $(srcdir)/../compress.c \
270 $(srcdir)/header.sed \
271 $(srcdir)/proto.str \
272 $(srcdir)/../version.h \
273 $(MKDOC)
274
275 bfd.h: $(BFD_H_DEP)
276 echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
277 for file in $(BFD_H_DEP); do \
278 case $$file in \
279 *-in.h) cat $$file >> $@ ;; \
280 */header.sed) break ;; \
281 *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
282 -e 's,$$,. */,' >> $@ ; \
283 ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
284 esac; \
285 done
286 echo "#ifdef __cplusplus" >> $@
287 echo "}" >> $@
288 echo "#endif" >> $@
289 echo "#endif" >> $@
290
291 bfdver.texi: $(srcdir)/Makefile.in
292 @echo "creating $@"; \
293 echo "@set VERSION $(VERSION)" > bfdver.texi; \
294 if [ -n "$(PKGVERSION)" ]; then \
295 echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \
296 fi; \
297 echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \
298 if [ -n "$(REPORT_BUGS_TEXI)" ]; then \
299 echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \
300 fi
301
302 noinst_TEXINFOS = bfdint.texi
303
304 MOSTLYCLEANFILES = $(MKDOC) *.o
305
306 CLEANFILES = *.p *.ip
307
308 DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
309
310 MAINTAINERCLEANFILES = $(DOCFILES)
311
312 # We want install to imply install-info as per GNU standards, despite the
313 # cygnus option.
314 install: install-info
315
316 MAINTAINERCLEANFILES += bfd.info
317
318 # Automake 1.9 will only build info files in the objdir if they are
319 # mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
320 # though, so we use a bogus condition.
321 if GENINSRC_NEVER
322 DISTCLEANFILES += bfd.info
323 endif
This page took 0.039047 seconds and 4 git commands to generate.