]>
Commit | Line | Data |
---|---|---|
bd32be01 MF |
1 | ## Process this file with automake to generate Makefile.in |
2 | ## | |
d87bef3a | 3 | ## Copyright (C) 2012-2023 Free Software Foundation, Inc. |
bd32be01 MF |
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 | DOCFILES = \ | |
21 | %D%/aoutx.texi \ | |
22 | %D%/archive.texi \ | |
23 | %D%/archures.texi \ | |
24 | %D%/bfdio.texi \ | |
25 | %D%/bfdt.texi \ | |
26 | %D%/bfdver.texi \ | |
27 | %D%/bfdwin.texi \ | |
28 | %D%/cache.texi \ | |
29 | %D%/coffcode.texi \ | |
30 | %D%/corefile.texi \ | |
31 | %D%/elfcode.texi \ | |
32 | %D%/elf.texi \ | |
33 | %D%/format.texi \ | |
34 | %D%/hash.texi \ | |
35 | %D%/init.texi \ | |
36 | %D%/libbfd.texi \ | |
37 | %D%/linker.texi \ | |
38 | %D%/mmo.texi \ | |
39 | %D%/opncls.texi \ | |
40 | %D%/reloc.texi \ | |
41 | %D%/section.texi \ | |
42 | %D%/syms.texi \ | |
43 | %D%/targets.texi | |
44 | ||
45 | # SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction | |
46 | # between VPATH and suffix rules. If you use GNU Make, perhaps other Makes, | |
47 | # you don't need these three: | |
48 | SRCDOC = \ | |
49 | $(srcdir)/aoutx.h $(srcdir)/archive.c \ | |
50 | $(srcdir)/archures.c $(srcdir)/bfd.c \ | |
51 | $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ | |
52 | $(srcdir)/cache.c $(srcdir)/coffcode.h \ | |
53 | $(srcdir)/corefile.c $(srcdir)/elf.c \ | |
54 | $(srcdir)/elfcode.h $(srcdir)/format.c \ | |
55 | $(srcdir)/libbfd.c $(srcdir)/opncls.c \ | |
56 | $(srcdir)/reloc.c $(srcdir)/section.c \ | |
57 | $(srcdir)/syms.c $(srcdir)/targets.c \ | |
58 | $(srcdir)/hash.c $(srcdir)/linker.c \ | |
59 | $(srcdir)/mmo.c | |
60 | ||
61 | SRCPROT = $(srcdir)/archive.c $(srcdir)/archures.c \ | |
62 | $(srcdir)/bfd.c $(srcdir)/coffcode.h $(srcdir)/corefile.c \ | |
63 | $(srcdir)/format.c $(srcdir)/libbfd.c \ | |
64 | $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ | |
65 | $(srcdir)/opncls.c $(srcdir)/reloc.c \ | |
66 | $(srcdir)/section.c $(srcdir)/syms.c \ | |
67 | $(srcdir)/targets.c $(srcdir)/init.c | |
68 | ||
69 | SRCIPROT = $(srcdir)/cache.c $(srcdir)/libbfd.c \ | |
70 | $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ | |
71 | $(srcdir)/reloc.c $(srcdir)/cpu-h8300.c \ | |
72 | $(srcdir)/cpu-i960.c $(srcdir)/archures.c \ | |
73 | $(srcdir)/init.c | |
74 | ||
75 | TEXIDIR = $(srcdir)/../texinfo/fsf | |
76 | ||
77 | info_TEXINFOS = %D%/bfd.texi | |
78 | %C%_bfd_TEXINFOS = $(DOCFILES) %D%/bfdsumm.texi | |
79 | ||
94fd627d L |
80 | AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/%D%" -I %D% |
81 | TEXI2DVI = texi2dvi -I "$(srcdir)/%D%" -I %D% | |
bd32be01 MF |
82 | |
83 | MKDOC = %D%/chew$(EXEEXT_FOR_BUILD) | |
84 | ||
85 | $(MKDOC): %D%/chew.stamp ; @true | |
86 | %D%/chew.stamp: $(srcdir)/%D%/chew.c %D%/$(am__dirstamp) | |
87 | $(AM_V_CCLD)$(CC_FOR_BUILD) -o %D%/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ | |
88 | $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \ | |
89 | -I. -I$(srcdir) -I%D% -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \ | |
b0de9ed8 | 90 | $(srcdir)/%D%/chew.c && \ |
bd32be01 MF |
91 | $(SHELL) $(srcdir)/../move-if-change \ |
92 | %D%/chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC) && \ | |
93 | touch $@ | |
94 | ||
95 | # We can't replace these rules with an implicit rule, because | |
96 | # makes without VPATH support couldn't find the .h files in `..'. | |
97 | ||
98 | # We do not depend on chew directly so that we can distribute the info | |
99 | # files, and permit people to rebuild them, without requiring the makeinfo | |
100 | # program. If somebody tries to rebuild info, but none of the .texi files | |
101 | # have changed, then nothing will be rebuilt. | |
102 | ||
103 | REGEN_TEXI = \ | |
104 | ( \ | |
105 | set -e; \ | |
106 | $(MKDOC) -f $(srcdir)/%D%/doc.str < $< > $@.tmp; \ | |
107 | texi=$@; \ | |
108 | texi=$${texi%.stamp}.texi; \ | |
109 | test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi .; \ | |
110 | $(SHELL) $(srcdir)/../move-if-change $@.tmp $$texi; \ | |
111 | touch $@; \ | |
112 | ) | |
113 | ||
114 | .PRECIOUS: %D%/%.stamp | |
115 | %D%/%.texi: %D%/%.stamp ; @true | |
116 | %D%/%.stamp: $(srcdir)/%.h $(srcdir)/%D%/doc.str $(MKDOC) %D%/$(am__dirstamp) | |
117 | $(AM_V_GEN)$(REGEN_TEXI) | |
118 | %D%/%.stamp: $(srcdir)/%.c $(srcdir)/%D%/doc.str $(MKDOC) %D%/$(am__dirstamp) | |
119 | $(AM_V_GEN)$(REGEN_TEXI) | |
120 | ||
8a782bbf L |
121 | # Avoid the %.stamp generating a builddir/bfd.texi that overrides the |
122 | # srcdir/ as well as regenerating doc/bfd.info for each make run. | |
123 | %D%/bfd.stamp: $(srcdir)/%D%/bfd.texi ; $(AM_V_at)touch $@ | |
bd32be01 MF |
124 | |
125 | # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with | |
126 | # bfd.texi on an 8.3 filesystem. | |
127 | %D%/bfdt.stamp: $(srcdir)/bfd.c $(srcdir)/%D%/doc.str $(MKDOC) %D%/$(am__dirstamp) | |
128 | $(AM_V_GEN)$(REGEN_TEXI) | |
129 | ||
130 | %D%/bfdver.texi: $(srcdir)/Makefile.in | |
131 | $(AM_V_GEN)\ | |
fdf55097 | 132 | $(MKDIR_P) $(@D); \ |
bd32be01 MF |
133 | echo "@set VERSION $(VERSION)" > $@; \ |
134 | if test -n "$(PKGVERSION)"; then \ | |
135 | echo "@set VERSION_PACKAGE $(PKGVERSION)" >> $@; \ | |
136 | fi; \ | |
137 | echo "@set UPDATED `date '+%B %Y'`" >> $@; \ | |
138 | if test -n "$(REPORT_BUGS_TEXI)"; then \ | |
139 | echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> $@; \ | |
140 | fi | |
141 | ||
142 | noinst_TEXINFOS = %D%/bfdint.texi | |
143 | ||
144 | MOSTLYCLEANFILES += $(MKDOC) %D%/*.o %D%/*.stamp | |
145 | ||
146 | DISTCLEANFILES += %D%/bfd.?? %D%/bfd.??? texput.log | |
147 | ||
148 | MAINTAINERCLEANFILES += $(DOCFILES) | |
149 | ||
bd32be01 MF |
150 | html-local: %D%/bfd/index.html |
151 | %D%/bfd/index.html: %D%/bfd.texi $(bfd_TEXINFOS) %D%/$(am__dirstamp) | |
152 | $(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \ | |
94fd627d | 153 | --split=node -o %D%/bfd $(srcdir)/%D%/bfd.texi |
bd32be01 MF |
154 | |
155 | MAINTAINERCLEANFILES += %D%/bfd.info |