# What version of the manual to build
DOCVER = gen
+# Options to extract the man page from ld.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
+
+POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
+
#stuff for self hosting (can be overridden in config file).
HOSTING_CRT0 = @HOSTING_CRT0@
HOSTING_LIBS = @HOSTING_LIBS@
eelf32bmip.o \
eelf32bmipn32.o \
eelf32btsmip.o \
+ eelf32ltsmip.o \
eelf32ebmip.o \
eelf32elmip.o \
eelf32fr30.o \
eelf32lppc.o \
eelf32lppcsim.o \
eelf32mcore.o \
+ eelf32openrisc.o \
eelf32ppc.o \
eelf32ppclinux.o \
eelf32ppcsim.o \
eelf_i386.o \
eelf_i386_be.o \
eelf_i386_chaos.o \
+ eelf_i386_ldso.o \
eelf_s390.o \
egld960.o \
egld960coff.o \
eelf64_sparc.o \
eelf64alpha.o \
eelf64bmip.o \
+ eelf64btsmip.o \
+ eelf64ltsmip.o \
eelf64hppa.o
ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
ldwrite.h mri.h deffile.h pe-dll.h
+ALL_64_EMULATIONS = eaixppc64.o eelf64_aix.o eelf64_ia64.o eelf_x86_64.o eelf64_s390.o eelf64_sparc.o eelf64alpha.o eelf64bmip.o eelf64btsmip.o eelf64ltsmip.o eelf64hppa.o
GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
ea29k.c: $(srcdir)/emulparams/a29k.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
${GENSCRIPTS} a29k "$(tdir_a29k)"
+eaixppc64.c: $(srcdir)/emulparams/aixppc64.sh \
+ $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} aixppc64 "$(tdir_aixppc64)"
eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} aixppc "$(tdir_aixppc)"
eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
+eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
+eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
+eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
+eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
+eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) $(srcdir)/ld.texinfo
+ MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
+
+# Build the man page from the texinfo file
+# The sed command removes the no-adjust Nroff command so that
+# the man output looks standard.
+$(srcdir)/ld.1: $(srcdir)/ld.texinfo
+ touch $(srcdir)/ld.1
+ -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
+ -($(POD2MAN) ld.pod | \
+ sed -e '/^.if n .na/d' > $(srcdir)/ld.1.T$$$$ && \
+ mv -f $(srcdir)/ld.1.T$$$$ $(srcdir)/ld.1) || \
+ (rm -f $(srcdir)/ld.1.T$$$$ && exit 1)
# We want to reconfigure if configure.host or configure.tgt changes.
config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt