1## Process this file with automake to generate Makefile.in 2# 3# Copyright (C) 2012-2014 Free Software Foundation, Inc. 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 20AUTOMAKE_OPTIONS = 1.9 cygnus 21 22DOCFILES = 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 31PROTOS = 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 38IPROTOS = 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: 43SRCDOC = $(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 55SRCPROT = $(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 63SRCIPROT = $(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 69TEXIDIR = $(srcdir)/../../texinfo/fsf 70 71info_TEXINFOS = bfd.texinfo 72bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi 73 74MKDOC = chew$(EXEEXT_FOR_BUILD) 75 76AM_CPPFLAGS = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \ 77 -I$(srcdir)/../../intl -I../../intl 78 79$(MKDOC): chew.stamp ; @true 80chew.stamp: $(srcdir)/chew.c 81 $(CC_FOR_BUILD) -o chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ 82 $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \ 83 $(SHELL) $(srcdir)/../../move-if-change \ 84 chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC); \ 85 touch $@ 86 87protos: libbfd.h libcoff.h bfd.h 88 89# We can't replace these rules with an implicit rule, because 90# makes without VPATH support couldn't find the .h files in `..'. 91 92# We do not depend on chew directly so that we can distribute the info 93# files, and permit people to rebuild them, without requiring the makeinfo 94# program. If somebody tries to rebuild info, but none of the .texi files 95# have changed, then nothing will be rebuilt. 96 97aoutx.texi: aoutx.stamp ; @true 98aoutx.stamp: $(srcdir)/../aoutx.h $(srcdir)/doc.str $(MKDOC) 99 ./$(MKDOC) -f $(srcdir)/doc.str < $< >aoutx.tmp 100 $(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi 101 touch $@ 102 103archive.texi: archive.stamp ; @true 104archive.stamp: $(srcdir)/../archive.c $(srcdir)/doc.str $(MKDOC) 105 ./$(MKDOC) -f $(srcdir)/doc.str < $< >archive.tmp 106 $(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi 107 touch $@ 108 109archures.texi: archures.stamp ; @true 110archures.stamp: $(srcdir)/../archures.c $(srcdir)/doc.str $(MKDOC) 111 ./$(MKDOC) -f $(srcdir)/doc.str < $< >archures.tmp 112 $(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi 113 touch $@ 114 115# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with 116# bfd.texinfo on an 8.3 filesystem. 117bfdt.texi: bfdt.stamp ; @true 118bfdt.stamp: $(srcdir)/../bfd.c $(srcdir)/doc.str $(MKDOC) 119 ./$(MKDOC) -f $(srcdir)/doc.str < $< >bfd.tmp 120 $(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi 121 touch $@ 122 123cache.texi: cache.stamp ; @true 124cache.stamp: $(srcdir)/../cache.c $(srcdir)/doc.str $(MKDOC) 125 ./$(MKDOC) -f $(srcdir)/doc.str < $< >cache.tmp 126 $(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi 127 touch $@ 128 129coffcode.texi: coffcode.stamp ; @true 130coffcode.stamp: $(srcdir)/../coffcode.h $(srcdir)/doc.str $(MKDOC) 131 ./$(MKDOC) -f $(srcdir)/doc.str < $< >coffcode.tmp 132 $(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi 133 touch $@ 134 135core.texi: core.stamp ; @true 136core.stamp: $(srcdir)/../corefile.c $(srcdir)/doc.str $(MKDOC) 137 ./$(MKDOC) -f $(srcdir)/doc.str < $< >core.tmp 138 $(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi 139 touch $@ 140 141elf.texi: elf.stamp ; @true 142elf.stamp: $(srcdir)/../elf.c $(srcdir)/doc.str $(MKDOC) 143 ./$(MKDOC) -f $(srcdir)/doc.str < $< >elf.tmp 144 $(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi 145 touch $@ 146 147elfcode.texi: elfcode.stamp ; @true 148elfcode.stamp: $(srcdir)/../elfcode.h $(srcdir)/doc.str $(MKDOC) 149 ./$(MKDOC) -f $(srcdir)/doc.str < $< >elfcode.tmp 150 $(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi 151 touch $@ 152 153mmo.texi: mmo.stamp ; @true 154mmo.stamp: $(srcdir)/../mmo.c $(srcdir)/doc.str $(MKDOC) 155 ./$(MKDOC) -f $(srcdir)/doc.str < $< >mmo.tmp 156 $(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi 157 touch $@ 158 159format.texi: format.stamp ; @true 160format.stamp: $(srcdir)/../format.c $(srcdir)/doc.str $(MKDOC) 161 ./$(MKDOC) -f $(srcdir)/doc.str < $< >format.tmp 162 $(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi 163 touch $@ 164 165libbfd.texi: libbfd.stamp ; @true 166libbfd.stamp: $(srcdir)/../libbfd.c $(srcdir)/doc.str $(MKDOC) 167 ./$(MKDOC) -f $(srcdir)/doc.str < $< >libbfd.tmp 168 $(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi 169 touch $@ 170 171bfdio.texi: bfdio.stamp ; @true 172bfdio.stamp: $(srcdir)/../bfdio.c $(srcdir)/doc.str $(MKDOC) 173 ./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdio.tmp 174 $(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi 175 touch $@ 176 177bfdwin.texi: bfdwin.stamp ; @true 178bfdwin.stamp: $(srcdir)/../bfdwin.c $(srcdir)/doc.str $(MKDOC) 179 ./$(MKDOC) -f $(srcdir)/doc.str < $< >bfdwin.tmp 180 $(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi 181 touch $@ 182 183opncls.texi: opncls.stamp ; @true 184opncls.stamp: $(srcdir)/../opncls.c $(srcdir)/doc.str $(MKDOC) 185 ./$(MKDOC) -f $(srcdir)/doc.str < $< >opncls.tmp 186 $(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi 187 touch $@ 188 189reloc.texi: reloc.stamp ; @true 190reloc.stamp: $(srcdir)/../reloc.c $(srcdir)/doc.str $(MKDOC) 191 ./$(MKDOC) -f $(srcdir)/doc.str < $< >reloc.tmp 192 $(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi 193 touch $@ 194 195section.texi: section.stamp ; @true 196section.stamp: $(srcdir)/../section.c $(srcdir)/doc.str $(MKDOC) 197 ./$(MKDOC) -f $(srcdir)/doc.str < $< >section.tmp 198 $(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi 199 touch $@ 200 201syms.texi: syms.stamp ; @true 202syms.stamp: $(srcdir)/../syms.c $(srcdir)/doc.str $(MKDOC) 203 ./$(MKDOC) -f $(srcdir)/doc.str < $< >syms.tmp 204 $(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi 205 touch $@ 206 207targets.texi: targets.stamp ; @true 208targets.stamp: $(srcdir)/../targets.c $(srcdir)/doc.str $(MKDOC) 209 ./$(MKDOC) -f $(srcdir)/doc.str < $< >targets.tmp 210 $(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi 211 touch $@ 212 213init.texi: init.stamp ; @true 214init.stamp: $(srcdir)/../init.c $(srcdir)/doc.str $(MKDOC) 215 ./$(MKDOC) -f $(srcdir)/doc.str < $< >init.tmp 216 $(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi 217 touch $@ 218 219hash.texi: hash.stamp ; @true 220hash.stamp: $(srcdir)/../hash.c $(srcdir)/doc.str $(MKDOC) 221 ./$(MKDOC) -f $(srcdir)/doc.str < $< >hash.tmp 222 $(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi 223 touch $@ 224 225linker.texi: linker.stamp ; @true 226linker.stamp: $(srcdir)/../linker.c $(srcdir)/doc.str $(MKDOC) 227 ./$(MKDOC) -f $(srcdir)/doc.str < $< >linker.tmp 228 $(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi 229 touch $@ 230 231LIBBFD_H_DEP = \ 232 $(srcdir)/../libbfd-in.h \ 233 $(srcdir)/../init.c \ 234 $(srcdir)/../libbfd.c \ 235 $(srcdir)/../bfdio.c \ 236 $(srcdir)/../bfdwin.c \ 237 $(srcdir)/../cache.c \ 238 $(srcdir)/../reloc.c \ 239 $(srcdir)/../archures.c \ 240 $(srcdir)/../elf.c \ 241 $(srcdir)/header.sed \ 242 $(srcdir)/proto.str \ 243 $(MKDOC) 244 245libbfd.h: $(LIBBFD_H_DEP) 246 echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@ 247 for file in $(LIBBFD_H_DEP); do \ 248 case $$file in \ 249 *-in.h) cat $$file >> $@ ;; \ 250 */header.sed) break ;; \ 251 *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ 252 -e 's,$$,. */,' >> $@ ; \ 253 ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ 254 esac; \ 255 done 256 257LIBCOFF_H_DEP = \ 258 $(srcdir)/../libcoff-in.h \ 259 $(srcdir)/../coffcode.h \ 260 $(srcdir)/header.sed \ 261 $(srcdir)/proto.str \ 262 $(MKDOC) 263 264libcoff.h: $(LIBCOFF_H_DEP) 265 echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@ 266 for file in $(LIBCOFF_H_DEP); do \ 267 case $$file in \ 268 *-in.h) cat $$file >> $@ ;; \ 269 */header.sed) break ;; \ 270 *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ 271 -e 's,$$,. */,' >> $@ ; \ 272 ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ 273 esac; \ 274 done 275 276BFD_H_DEP = \ 277 $(srcdir)/../bfd-in.h \ 278 $(srcdir)/../init.c \ 279 $(srcdir)/../opncls.c \ 280 $(srcdir)/../libbfd.c \ 281 $(srcdir)/../bfdio.c \ 282 $(srcdir)/../bfdwin.c \ 283 $(srcdir)/../section.c \ 284 $(srcdir)/../archures.c \ 285 $(srcdir)/../reloc.c \ 286 $(srcdir)/../syms.c \ 287 $(srcdir)/../bfd.c \ 288 $(srcdir)/../archive.c \ 289 $(srcdir)/../corefile.c \ 290 $(srcdir)/../targets.c \ 291 $(srcdir)/../format.c \ 292 $(srcdir)/../linker.c \ 293 $(srcdir)/../simple.c \ 294 $(srcdir)/../compress.c \ 295 $(srcdir)/header.sed \ 296 $(srcdir)/proto.str \ 297 $(srcdir)/../version.h \ 298 $(MKDOC) 299 300bfd.h: $(BFD_H_DEP) 301 echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@ 302 for file in $(BFD_H_DEP); do \ 303 case $$file in \ 304 *-in.h) cat $$file >> $@ ;; \ 305 */header.sed) break ;; \ 306 *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ 307 -e 's,$$,. */,' >> $@ ; \ 308 ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \ 309 esac; \ 310 done 311 echo "#ifdef __cplusplus" >> $@ 312 echo "}" >> $@ 313 echo "#endif" >> $@ 314 echo "#endif" >> $@ 315 316bfdver.texi: $(srcdir)/Makefile.in 317 @echo "creating $@"; \ 318 echo "@set VERSION $(VERSION)" > bfdver.texi; \ 319 if [ -n "$(PKGVERSION)" ]; then \ 320 echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \ 321 fi; \ 322 echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \ 323 if [ -n "$(REPORT_BUGS_TEXI)" ]; then \ 324 echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \ 325 fi 326 327noinst_TEXINFOS = bfdint.texi 328 329MOSTLYCLEANFILES = $(MKDOC) *.o *.stamp 330 331CLEANFILES = *.p *.ip 332 333DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log 334 335MAINTAINERCLEANFILES = $(DOCFILES) 336 337# We want install to imply install-info as per GNU standards, despite the 338# cygnus option. 339install: install-info 340 341MAINTAINERCLEANFILES += bfd.info 342 343# Automake 1.9 will only build info files in the objdir if they are 344# mentioned in DISTCLEANFILES. It doesn't have to be unconditional, 345# though, so we use a bogus condition. 346if GENINSRC_NEVER 347DISTCLEANFILES += bfd.info 348endif 349