1 ## Process this file with automake to generate Makefile.in
3 # Copyright 2012 Free Software Foundation
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.
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.
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/>.
20 AUTOMAKE_OPTIONS = 1.9 cygnus
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 \
31 PROTOS = archive.p archures.p bfd.p \
34 libbfd.p opncls.p reloc.p \
35 section.p syms.p targets.p \
36 format.p core.p init.p
38 IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
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 \
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
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 \
69 TEXIDIR = $(srcdir)/../../texinfo/fsf
71 info_TEXINFOS = bfd.texinfo
72 bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi
74 MKDOC = chew$(EXEEXT_FOR_BUILD)
76 AM_CPPFLAGS = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
77 -I$(srcdir)/../../intl -I../../intl
79 $(MKDOC): $(srcdir)/chew.c
80 $(CC_FOR_BUILD) -o chew.$$$$ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
81 $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \
82 $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
84 protos: libbfd.h libcoff.h bfd.h
86 # We can't replace these rules with an implicit rule, because
87 # makes without VPATH support couldn't find the .h files in `..'.
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.
94 aoutx.texi: chew.c $(srcdir)/../aoutx.h $(srcdir)/doc.str
96 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
97 $(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
99 archive.texi: chew.c $(srcdir)/../archive.c $(srcdir)/doc.str
101 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
102 $(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
104 archures.texi: chew.c $(srcdir)/../archures.c $(srcdir)/doc.str
106 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
107 $(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
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
113 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
114 $(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
116 cache.texi: chew.c $(srcdir)/../cache.c $(srcdir)/doc.str
118 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
119 $(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
121 coffcode.texi: chew.c $(srcdir)/../coffcode.h $(srcdir)/doc.str
123 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
124 $(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
126 core.texi: chew.c $(srcdir)/../corefile.c $(srcdir)/doc.str
128 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
129 $(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
131 elf.texi: chew.c $(srcdir)/../elf.c $(srcdir)/doc.str
133 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
134 $(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
136 elfcode.texi: chew.c $(srcdir)/../elfcode.h $(srcdir)/doc.str
138 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
139 $(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
141 mmo.texi: chew.c $(srcdir)/../mmo.c $(srcdir)/doc.str
143 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
144 $(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
146 format.texi: chew.c $(srcdir)/../format.c $(srcdir)/doc.str
148 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
149 $(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
151 libbfd.texi: chew.c $(srcdir)/../libbfd.c $(srcdir)/doc.str
153 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
154 $(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
156 bfdio.texi: chew.c $(srcdir)/../bfdio.c $(srcdir)/doc.str
158 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
159 $(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
161 bfdwin.texi: chew.c $(srcdir)/../bfdwin.c $(srcdir)/doc.str
163 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
164 $(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
166 opncls.texi: chew.c $(srcdir)/../opncls.c $(srcdir)/doc.str
168 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
169 $(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
171 reloc.texi: chew.c $(srcdir)/../reloc.c $(srcdir)/doc.str
173 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
174 $(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi
176 section.texi: chew.c $(srcdir)/../section.c $(srcdir)/doc.str
178 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
179 $(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
181 syms.texi: chew.c $(srcdir)/../syms.c $(srcdir)/doc.str
183 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
184 $(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
186 targets.texi: chew.c $(srcdir)/../targets.c $(srcdir)/doc.str
188 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
189 $(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
191 init.texi: chew.c $(srcdir)/../init.c $(srcdir)/doc.str
193 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
194 $(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
196 hash.texi: chew.c $(srcdir)/../hash.c $(srcdir)/doc.str
198 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
199 $(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
201 linker.texi: chew.c $(srcdir)/../linker.c $(srcdir)/doc.str
203 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
204 $(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
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 \
216 $(srcdir)/header.sed \
217 $(srcdir)/proto.str \
220 libbfd.h: $(LIBBFD_H_DEP)
221 echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
222 for file in $(LIBBFD_H_DEP); do \
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 >> $@ ;; \
233 $(srcdir)/../libcoff-in.h \
234 $(srcdir)/../coffcode.h \
235 $(srcdir)/header.sed \
236 $(srcdir)/proto.str \
239 libcoff.h: $(LIBCOFF_H_DEP)
240 echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@
241 for file in $(LIBCOFF_H_DEP); do \
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 >> $@ ;; \
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 \
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 \
276 echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
277 for file in $(BFD_H_DEP); do \
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 >> $@ ;; \
286 echo "#ifdef __cplusplus" >> $@
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; \
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; \
302 noinst_TEXINFOS = bfdint.texi
304 MOSTLYCLEANFILES = $(MKDOC) *.o
306 CLEANFILES = *.p *.ip
308 DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
310 MAINTAINERCLEANFILES = $(DOCFILES)
312 # We want install to imply install-info as per GNU standards, despite the
314 install: install-info
316 MAINTAINERCLEANFILES += bfd.info
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.
322 DISTCLEANFILES += bfd.info