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