OSDN Git Service

d0ef00a00cac06131f5bbda4cd0dfe082cf8d257
[pf3gnuchains/pf3gnuchains4x.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 = -D_GNU_SOURCE -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
58         -I$(srcdir)/../../intl -I../../intl
59
60 $(MKDOC): chew.o
61         $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
62
63 chew.o: chew.c
64         $(CC_FOR_BUILD) -c $(INCLUDES) $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
65
66 protos: libbfd.h libcoff.h bfd.h
67
68 $(srcdir)/bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
69
70 # We can't replace these rules with an implicit rule, because
71 # makes without VPATH support couldn't find the .h files in `..'.
72
73 # We use s-XXX targets so that we can distribute the info files,
74 # and permit people to rebuild them, without requiring the makeinfo
75 # program.  If somebody tries to rebuild info, but none of the .texi
76 # files have changed, then this Makefile will build chew, and will
77 # build all of the stamp files, but will not actually have to rebuild
78 # bfd.info.
79
80 s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
81         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
82         $(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
83         touch s-aoutx
84 aoutx.texi: s-aoutx
85
86 s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
87         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
88         $(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
89         touch s-archive
90 archive.texi: s-archive
91
92 s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
93         ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
94         $(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
95         touch s-archures
96 archures.texi: s-archures
97
98 # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
99 # bfd.texinfo on an 8.3 filesystem.
100 s-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
101         ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
102         $(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
103         touch s-bfd
104 bfdt.texi: s-bfd
105
106 s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
107         ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
108         $(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
109         touch s-cache
110 cache.texi: s-cache
111
112 s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
113         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
114         $(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
115         touch s-coffcode
116 coffcode.texi: s-coffcode
117
118 s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
119         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
120         $(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
121         touch s-core
122 core.texi: s-core
123
124 s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
125         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
126         $(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
127         touch s-elf
128 elf.texi: s-elf
129
130 s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
131         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
132         $(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
133         touch s-elfcode
134 elfcode.texi: s-elfcode
135
136 s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
137         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
138         $(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
139         touch s-mmo
140 mmo.texi: s-mmo
141
142 s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
143         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
144         $(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
145         touch s-format
146 format.texi: s-format
147
148 s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
149         ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
150         $(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
151         touch s-libbfd
152 libbfd.texi: s-libbfd
153
154 s-bfdio: $(MKDOC) $(srcdir)/../bfdio.c $(srcdir)/doc.str
155         ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
156         $(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
157         touch s-bfdio
158 bfdio.texi: s-bfdio
159
160 s-bfdwin: $(MKDOC) $(srcdir)/../bfdwin.c $(srcdir)/doc.str
161         ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
162         $(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
163         touch s-bfdwin
164 bfdwin.texi: s-bfdwin
165
166 s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
167         ./$(MKDOC) -f $(srcdir)/doc.str  <$(srcdir)/../opncls.c >opncls.tmp
168         $(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
169         touch s-opncls
170 opncls.texi: s-opncls
171
172 s-reloc: $(MKDOC) $(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
175         touch s-reloc
176 reloc.texi: s-reloc
177
178 s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
179         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
180         $(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
181         touch s-section
182 section.texi: s-section
183
184 s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
185         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
186         $(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
187         touch s-syms
188 syms.texi: s-syms
189
190 s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
191         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
192         $(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
193         touch s-targets
194 targets.texi: s-targets
195
196 s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
197         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
198         $(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
199         touch s-init
200 init.texi: s-init
201
202 s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
203         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
204         $(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
205         touch s-hash
206 hash.texi: s-hash
207
208 s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
209         ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
210         $(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
211         touch s-linker
212 linker.texi: s-linker
213
214 LIBBFD_H_DEP = \
215         $(srcdir)/../libbfd-in.h        \
216         $(srcdir)/../init.c             \
217         $(srcdir)/../libbfd.c           \
218         $(srcdir)/../bfdio.c            \
219         $(srcdir)/../bfdwin.c           \
220         $(srcdir)/../cache.c            \
221         $(srcdir)/../reloc.c            \
222         $(srcdir)/../archures.c         \
223         $(srcdir)/../elf.c              \
224         $(srcdir)/header.sed            \
225         $(srcdir)/proto.str             \
226         $(MKDOC)
227
228 libbfd.h: $(LIBBFD_H_DEP)
229         echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
230         for file in $(LIBBFD_H_DEP); do \
231           case $$file in \
232             *-in.h) cat $$file >> $@ ;; \
233             */header.sed) break ;; \
234             *)  echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
235                                 -e 's,$$,.  */,' >> $@ ; \
236                 ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
237           esac; \
238         done
239
240 LIBCOFF_H_DEP = \
241         $(srcdir)/../libcoff-in.h       \
242         $(srcdir)/../coffcode.h         \
243         $(srcdir)/header.sed            \
244         $(srcdir)/proto.str             \
245         $(MKDOC)
246
247 libcoff.h: $(LIBCOFF_H_DEP)
248         echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@
249         for file in $(LIBCOFF_H_DEP); do \
250           case $$file in \
251             *-in.h) cat $$file >> $@ ;; \
252             */header.sed) break ;; \
253             *)  echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
254                                 -e 's,$$,.  */,' >> $@ ; \
255                 ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
256           esac; \
257         done
258
259 BFD_H_DEP = \
260         $(srcdir)/../bfd-in.h           \
261         $(srcdir)/../init.c             \
262         $(srcdir)/../opncls.c           \
263         $(srcdir)/../libbfd.c           \
264         $(srcdir)/../bfdio.c            \
265         $(srcdir)/../bfdwin.c           \
266         $(srcdir)/../section.c          \
267         $(srcdir)/../archures.c         \
268         $(srcdir)/../reloc.c            \
269         $(srcdir)/../syms.c             \
270         $(srcdir)/../bfd.c              \
271         $(srcdir)/../archive.c          \
272         $(srcdir)/../corefile.c         \
273         $(srcdir)/../targets.c          \
274         $(srcdir)/../format.c           \
275         $(srcdir)/../linker.c           \
276         $(srcdir)/../simple.c           \
277         $(srcdir)/header.sed            \
278         $(srcdir)/proto.str             \
279         $(srcdir)/../version.h          \
280         $(MKDOC)
281
282 bfd.h: $(BFD_H_DEP)
283         echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
284         for file in $(BFD_H_DEP); do \
285           case $$file in \
286             *-in.h) cat $$file >> $@ ;; \
287             */header.sed) break ;; \
288             *)  echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
289                                 -e 's,$$,.  */,' >> $@ ; \
290                 ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
291           esac; \
292         done
293         echo "#ifdef __cplusplus" >> $@
294         echo "}" >> $@
295         echo "#endif" >> $@
296         echo "#endif" >> $@
297
298 noinst_TEXINFOS = bfdint.texi
299
300 MOSTLYCLEANFILES = $(MKDOC) *.o
301
302 CLEANFILES = s-* *.p *.ip
303
304 DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
305
306 MAINTAINERCLEANFILES = $(DOCFILES)
307
308 # We want install to imply install-info as per GNU standards, despite the
309 # cygnus option.
310 install: install-info