1## Process this file with automake to generate Makefile.in 2# 3# Copyright (C) 2012-2017 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 < $(srcdir)/../aoutx.h >aoutx.tmp 100 test -e aoutx.texi || test ! -f $(srcdir)/aoutx.texi || cp -p $(srcdir)/aoutx.texi . 101 $(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi 102 touch $@ 103 104archive.texi: archive.stamp ; @true 105archive.stamp: $(srcdir)/../archive.c $(srcdir)/doc.str $(MKDOC) 106 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archive.c >archive.tmp 107 test -e archive.texi || test ! -f $(srcdir)/archive.texi || cp -p $(srcdir)/archive.texi . 108 $(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi 109 touch $@ 110 111archures.texi: archures.stamp ; @true 112archures.stamp: $(srcdir)/../archures.c $(srcdir)/doc.str $(MKDOC) 113 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp 114 test -e archures.texi || test ! -f $(srcdir)/archures.texi || cp -p $(srcdir)/archures.texi . 115 $(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi 116 touch $@ 117 118# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with 119# bfd.texinfo on an 8.3 filesystem. 120bfdt.texi: bfdt.stamp ; @true 121bfdt.stamp: $(srcdir)/../bfd.c $(srcdir)/doc.str $(MKDOC) 122 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp 123 test -e bfdt.texi || test ! -f $(srcdir)/bfdt.texi || cp -p $(srcdir)/bfdt.texi . 124 $(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi 125 touch $@ 126 127cache.texi: cache.stamp ; @true 128cache.stamp: $(srcdir)/../cache.c $(srcdir)/doc.str $(MKDOC) 129 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp 130 test -e cache.texi || test ! -f $(srcdir)/cache.texi || cp -p $(srcdir)/cache.texi . 131 $(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi 132 touch $@ 133 134coffcode.texi: coffcode.stamp ; @true 135coffcode.stamp: $(srcdir)/../coffcode.h $(srcdir)/doc.str $(MKDOC) 136 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../coffcode.h >coffcode.tmp 137 test -e coffcode.texi || test ! -f $(srcdir)/coffcode.texi || cp -p $(srcdir)/coffcode.texi . 138 $(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi 139 touch $@ 140 141core.texi: core.stamp ; @true 142core.stamp: $(srcdir)/../corefile.c $(srcdir)/doc.str $(MKDOC) 143 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../corefile.c >core.tmp 144 test -e core.texi || test ! -f $(srcdir)/core.texi || cp -p $(srcdir)/core.texi . 145 $(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi 146 touch $@ 147 148elf.texi: elf.stamp ; @true 149elf.stamp: $(srcdir)/../elf.c $(srcdir)/doc.str $(MKDOC) 150 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../elf.c >elf.tmp 151 test -e elf.texi || test ! -f $(srcdir)/elf.texi || cp -p $(srcdir)/elf.texi . 152 $(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi 153 touch $@ 154 155elfcode.texi: elfcode.stamp ; @true 156elfcode.stamp: $(srcdir)/../elfcode.h $(srcdir)/doc.str $(MKDOC) 157 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../elfcode.h >elfcode.tmp 158 test -e elfcode.texi || test ! -f $(srcdir)/elfcode.texi || cp -p $(srcdir)/elfcode.texi . 159 $(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi 160 touch $@ 161 162mmo.texi: mmo.stamp ; @true 163mmo.stamp: $(srcdir)/../mmo.c $(srcdir)/doc.str $(MKDOC) 164 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../mmo.c >mmo.tmp 165 test -e mmo.texi || test ! -f $(srcdir)/mmo.texi || cp -p $(srcdir)/mmo.texi . 166 $(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi 167 touch $@ 168 169format.texi: format.stamp ; @true 170format.stamp: $(srcdir)/../format.c $(srcdir)/doc.str $(MKDOC) 171 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../format.c >format.tmp 172 test -e format.texi || test ! -f $(srcdir)/format.texi || cp -p $(srcdir)/format.texi . 173 $(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi 174 touch $@ 175 176libbfd.texi: libbfd.stamp ; @true 177libbfd.stamp: $(srcdir)/../libbfd.c $(srcdir)/doc.str $(MKDOC) 178 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp 179 test -e libbfd.texi || test ! -f $(srcdir)/libbfd.texi || cp -p $(srcdir)/libbfd.texi . 180 $(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi 181 touch $@ 182 183bfdio.texi: bfdio.stamp ; @true 184bfdio.stamp: $(srcdir)/../bfdio.c $(srcdir)/doc.str $(MKDOC) 185 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp 186 test -e bfdio.texi || test ! -f $(srcdir)/bfdio.texi || cp -p $(srcdir)/bfdio.texi . 187 $(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi 188 touch $@ 189 190bfdwin.texi: bfdwin.stamp ; @true 191bfdwin.stamp: $(srcdir)/../bfdwin.c $(srcdir)/doc.str $(MKDOC) 192 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp 193 test -e bfdwin.texi || test ! -f $(srcdir)/bfdwin.texi || cp -p $(srcdir)/bfdwin.texi . 194 $(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi 195 touch $@ 196 197opncls.texi: opncls.stamp ; @true 198opncls.stamp: $(srcdir)/../opncls.c $(srcdir)/doc.str $(MKDOC) 199 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../opncls.c >opncls.tmp 200 test -e opncls.texi || test ! -f $(srcdir)/opncls.texi || cp -p $(srcdir)/opncls.texi . 201 $(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi 202 touch $@ 203 204reloc.texi: reloc.stamp ; @true 205reloc.stamp: $(srcdir)/../reloc.c $(srcdir)/doc.str $(MKDOC) 206 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../reloc.c >reloc.tmp 207 test -e reloc.texi || test ! -f $(srcdir)/reloc.texi || cp -p $(srcdir)/reloc.texi . 208 $(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi 209 touch $@ 210 211section.texi: section.stamp ; @true 212section.stamp: $(srcdir)/../section.c $(srcdir)/doc.str $(MKDOC) 213 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../section.c >section.tmp 214 test -e section.texi || test ! -f $(srcdir)/section.texi || cp -p $(srcdir)/section.texi . 215 $(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi 216 touch $@ 217 218syms.texi: syms.stamp ; @true 219syms.stamp: $(srcdir)/../syms.c $(srcdir)/doc.str $(MKDOC) 220 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../syms.c >syms.tmp 221 test -e syms.texi || test ! -f $(srcdir)/syms.texi || cp -p $(srcdir)/syms.texi . 222 $(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi 223 touch $@ 224 225targets.texi: targets.stamp ; @true 226targets.stamp: $(srcdir)/../targets.c $(srcdir)/doc.str $(MKDOC) 227 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../targets.c >targets.tmp 228 test -e targets.texi || test ! -f $(srcdir)/targets.texi || cp -p $(srcdir)/targets.texi . 229 $(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi 230 touch $@ 231 232init.texi: init.stamp ; @true 233init.stamp: $(srcdir)/../init.c $(srcdir)/doc.str $(MKDOC) 234 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../init.c >init.tmp 235 test -e init.texi || test ! -f $(srcdir)/init.texi || cp -p $(srcdir)/init.texi . 236 $(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi 237 touch $@ 238 239hash.texi: hash.stamp ; @true 240hash.stamp: $(srcdir)/../hash.c $(srcdir)/doc.str $(MKDOC) 241 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../hash.c >hash.tmp 242 test -e hash.texi || test ! -f $(srcdir)/hash.texi || cp -p $(srcdir)/hash.texi . 243 $(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi 244 touch $@ 245 246linker.texi: linker.stamp ; @true 247linker.stamp: $(srcdir)/../linker.c $(srcdir)/doc.str $(MKDOC) 248 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../linker.c >linker.tmp 249 test -e linker.texi || test ! -f $(srcdir)/linker.texi || cp -p $(srcdir)/linker.texi . 250 $(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi 251 touch $@ 252 253LIBBFD_H_DEP = \ 254 $(srcdir)/../libbfd-in.h \ 255 $(srcdir)/../libbfd.c \ 256 $(srcdir)/../bfdio.c \ 257 $(srcdir)/../bfdwin.c \ 258 $(srcdir)/../cache.c \ 259 $(srcdir)/../reloc.c \ 260 $(srcdir)/../archures.c \ 261 $(srcdir)/../linker.c \ 262 $(srcdir)/header.sed \ 263 $(srcdir)/proto.str \ 264 $(MKDOC) 265 266libbfd.h: $(LIBBFD_H_DEP) 267 echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@ 268 for file in $(LIBBFD_H_DEP); do \ 269 case $$file in \ 270 *-in.h) cat $$file >> $@ ;; \ 271 */header.sed) break ;; \ 272 *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ 273 -e 's,$$,. */,' >> $@ ; \ 274 ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ 275 esac; \ 276 done 277 echo "#ifdef __cplusplus" >> $@ 278 echo "}" >> $@ 279 echo "#endif" >> $@ 280 281LIBCOFF_H_DEP = \ 282 $(srcdir)/../libcoff-in.h \ 283 $(srcdir)/../coffcode.h \ 284 $(srcdir)/header.sed \ 285 $(srcdir)/proto.str \ 286 $(MKDOC) 287 288libcoff.h: $(LIBCOFF_H_DEP) 289 echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@ 290 for file in $(LIBCOFF_H_DEP); do \ 291 case $$file in \ 292 *-in.h) cat $$file >> $@ ;; \ 293 */header.sed) break ;; \ 294 *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ 295 -e 's,$$,. */,' >> $@ ; \ 296 ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ 297 esac; \ 298 done 299 echo "#ifdef __cplusplus" >> $@ 300 echo "}" >> $@ 301 echo "#endif" >> $@ 302 303BFD_H_DEP = \ 304 $(srcdir)/../bfd-in.h \ 305 $(srcdir)/../init.c \ 306 $(srcdir)/../opncls.c \ 307 $(srcdir)/../libbfd.c \ 308 $(srcdir)/../bfdio.c \ 309 $(srcdir)/../bfdwin.c \ 310 $(srcdir)/../section.c \ 311 $(srcdir)/../archures.c \ 312 $(srcdir)/../reloc.c \ 313 $(srcdir)/../syms.c \ 314 $(srcdir)/../bfd.c \ 315 $(srcdir)/../archive.c \ 316 $(srcdir)/../corefile.c \ 317 $(srcdir)/../targets.c \ 318 $(srcdir)/../format.c \ 319 $(srcdir)/../linker.c \ 320 $(srcdir)/../simple.c \ 321 $(srcdir)/../compress.c \ 322 $(srcdir)/header.sed \ 323 $(srcdir)/proto.str \ 324 $(srcdir)/../version.h \ 325 $(MKDOC) 326 327bfd.h: $(BFD_H_DEP) 328 echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@ 329 for file in $(BFD_H_DEP); do \ 330 case $$file in \ 331 *-in.h) cat $$file >> $@ ;; \ 332 */header.sed) break ;; \ 333 *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \ 334 -e 's,$$,. */,' >> $@ ; \ 335 ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \ 336 esac; \ 337 done 338 echo "#ifdef __cplusplus" >> $@ 339 echo "}" >> $@ 340 echo "#endif" >> $@ 341 echo "#endif" >> $@ 342 343bfdver.texi: $(srcdir)/Makefile.in 344 @echo "creating $@"; \ 345 echo "@set VERSION $(VERSION)" > bfdver.texi; \ 346 if test -n "$(PKGVERSION)"; then \ 347 echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \ 348 fi; \ 349 echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \ 350 if test -n "$(REPORT_BUGS_TEXI)"; then \ 351 echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \ 352 fi 353 354noinst_TEXINFOS = bfdint.texi 355 356MOSTLYCLEANFILES = $(MKDOC) *.o *.stamp 357 358CLEANFILES = *.p *.ip 359 360DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log 361 362MAINTAINERCLEANFILES = $(DOCFILES) 363 364# We want install to imply install-info as per GNU standards, despite the 365# cygnus option. 366install: install-info 367 368MAINTAINERCLEANFILES += bfd.info 369 370# Automake 1.9 will only build info files in the objdir if they are 371# mentioned in DISTCLEANFILES. It doesn't have to be unconditional, 372# though, so we use a bogus condition. 373if GENINSRC_NEVER 374DISTCLEANFILES += bfd.info 375endif 376