1 ## Process this file with automake to generate Makefile.in
3 # Copyright (C) 2012-2024 Free Software Foundation, Inc.
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.
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.
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/>.
20 AUTOMAKE_OPTIONS = dejagnu no-texinfo.tex no-dist foreign info-in-builddir
21 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
22 TEXINFO_TEX = ../texinfo/texinfo.tex
26 tooldir = $(exec_prefix)/$(target_alias)
28 YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
30 LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
32 # Automake 1.10+ disables lex and yacc output file regeneration if
33 # maintainer mode is disabled. Avoid this.
37 # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
38 # -I../zlib, unless we were configured with --with-system-zlib, in which
39 # case both are empty.
43 ELF_CFLAGS=-DELF_LIST_OPTIONS=@elf_list_options@ \
44 -DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
45 -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
46 WARN_CFLAGS = @WARN_CFLAGS@
47 NO_WERROR = @NO_WERROR@
48 AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
50 # We put the scripts in the directory $(scriptdir)/ldscripts.
51 # We can't put the scripts in $(datadir) because the SEARCH_DIR
52 # directives need to be different for native and cross linkers.
53 scriptdir = $(tooldir)/lib
56 EMULATION_OFILES = @EMULATION_OFILES@
57 EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
60 # Search path to override the default search path for -lfoo libraries.
61 # If LIB_PATH is empty, the ones in the script (if any) are left alone.
62 # (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
63 # a cross-linker, in which case the default is empty. See genscripts.sh.)
64 # Otherwise, they are replaced with the ones given in LIB_PATH,
65 # which may have the form: LIB_PATH=/lib:/usr/local/lib. This can be set
66 # when the linker is configured via the --with-lib-path configure switch.
69 BASEDIR = $(srcdir)/..
70 BFDDIR = $(BASEDIR)/bfd
71 INCDIR = $(BASEDIR)/include
73 # What version of the manual to build
76 # Options to extract the man page from ld.texi
79 TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
81 POD2MAN = pod2man --center="GNU Development Tools" \
82 --release="binutils-$(VERSION)" --section=1
84 # Setup the testing framework, if you have one
90 if [ -f $$r/../gcc/xgcc ] ; then \
91 if [ -f $$r/../newlib/Makefile ] ; then \
92 echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
94 echo $$r/../gcc/xgcc -B$$r/../gcc/; \
97 if [ "@host@" = "@target@" ] ; then \
100 echo gcc | sed '$(transform)'; \
105 if [ -f $$r/../gcc/g++ ] ; then \
106 if [ -f $$r/../newlib/Makefile ] ; then \
107 echo $$r/../gcc/g++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
109 echo $$r/../gcc/g++ -B$$r/../gcc/; \
111 elif [ -f $$r/../gcc/xg++ ] ; then \
112 if [ -f $$r/../newlib/Makefile ] ; then \
113 echo $$r/../gcc/xg++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
115 echo $$r/../gcc/xg++ -B$$r/../gcc/; \
118 if [ "@host@" = "@target@" ] ; then \
121 echo g++ | sed '$(transform)'; \
125 # Strip out sanitization options as we want to test building binaries without any extra paraphernalia
126 CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=[^ ]*//g'`
127 CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=[^ ]*//g'`
129 transform = s/^ld-new$$/$(installed_linker)/;@program_transform_name@
130 bin_PROGRAMS = ld-new
131 info_TEXINFOS = ld.texi ldint.texi
132 ld_TEXINFOS = configdoc.texi
133 noinst_TEXINFOS = ldint.texi
136 AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
137 -I $(top_srcdir)/../libiberty --no-split
138 TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
139 -I $(top_srcdir)/../libiberty
141 AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @zlibinc@ \
142 @INCINTL@ $(HDEFINES) $(CFLAGS) @LARGEFILE_CPPFLAGS@ \
143 -DLOCALEDIR="\"$(datadir)/locale\""
145 BFDLIB = ../bfd/libbfd.la
146 LIBIBERTY = ../libiberty/libiberty.a
148 LIBCTF = ../libctf/libctf.la
153 # These all start with e so 'make clean' can find them.
154 ALL_EMULATION_SOURCES = \
172 earmelf_linux_eabi.c \
173 earmelf_linux_fdpiceabi.c \
182 earmelfb_linux_eabi.c \
183 earmelfb_linux_fdpiceabi.c \
219 eelf32_sparc_sol2.c \
220 eelf32_sparc_vxworks.c \
223 eelf32_tic6x_elf_be.c \
224 eelf32_tic6x_elf_le.c \
226 eelf32_tic6x_linux_be.c \
227 eelf32_tic6x_linux_le.c \
234 eelf32epiphany_4x4.c \
255 eelf32microblazeel.c \
285 eelf_i386_vxworks.c \
297 eh8300sxelf_linux.c \
365 etic3xcoff_onchip.c \
377 ALL_EMULATIONS = $(ALL_EMULATION_SOURCES:.c=.@OBJEXT@)
379 ALL_64_EMULATION_SOURCES = \
381 eaarch64cloudabib.c \
401 eelf32briscv_ilp32.c \
402 eelf32briscv_ilp32f.c \
405 eelf32btsmip_fbsd.c \
407 eelf32btsmipn32_fbsd.c \
409 eelf32ebmipvxworks.c \
411 eelf32elmipvxworks.c \
419 eelf32lriscv_ilp32.c \
420 eelf32lriscv_ilp32f.c \
423 eelf32ltsmip_fbsd.c \
425 eelf32ltsmipn32_fbsd.c \
426 eelf32mipswindiss.c \
433 eelf64_sparc_fbsd.c \
434 eelf64_sparc_sol2.c \
441 eelf64briscv_lp64.c \
442 eelf64briscv_lp64f.c \
444 eelf64btsmip_fbsd.c \
452 eelf64lriscv_lp64.c \
453 eelf64lriscv_lp64f.c \
455 eelf64ltsmip_fbsd.c \
462 eelf_mipsel_haiku.c \
464 eelf_x86_64_cloudabi.c \
466 eelf_x86_64_haiku.c \
472 ALL_64_EMULATIONS = $(ALL_64_EMULATION_SOURCES:.c=.@OBJEXT@)
474 ALL_EMUL_EXTRA_OFILES = \
481 ALL_64_EMUL_EXTRA_OFILES = \
484 CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
485 ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
486 mri.c ldcref.c pe-dll.c pep-dll.c ldlex-wrapper.c \
487 plugin.c ldbuildid.c ldelf.c ldelfgen.c \
490 HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
491 ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
492 ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h \
493 elf-hints-local.h plugin.h ldbuildid.h ldelf.h ldelfgen.h \
496 GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
497 GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
499 # Require an early dependency on the generated headers, as the dependency
500 # tracking will not cause them to be built beforehand.
501 BUILT_SOURCES = $(GENERATED_HFILES) @MAINT@ $(GENERATED_CFILES) \
502 $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
504 OFILES = ldgram.@OBJEXT@ ldlex-wrapper.@OBJEXT@ lexsup.@OBJEXT@ ldlang.@OBJEXT@ \
505 mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ plugin.@OBJEXT@ \
506 ldwrite.@OBJEXT@ ldexp.@OBJEXT@ ldemul.@OBJEXT@ ldver.@OBJEXT@ ldmisc.@OBJEXT@ \
507 ldfile.@OBJEXT@ ldcref.@OBJEXT@ ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES} \
510 STAGESTUFF = *.@OBJEXT@ ldscripts/* e*.c
512 # Disable -Werror, if it has been enabled, since old versions of bison/
513 # yacc will produce working code which contain compile time warnings.
514 ldgram.@OBJEXT@: ldgram.c
516 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR)
517 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
520 source='ldgram.c' object='$@' libtool=no @AMDEPBACKSLASH@
521 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
523 $(AM_V_CC)$(COMPILE) -c `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR)
526 ldlex-wrapper.@OBJEXT@: ldlex-wrapper.c ldlex.c
528 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/ldlex-wrapper.c $(NO_WERROR)
529 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
532 source='ldlex-wrapper.c' object='$@' libtool=no @AMDEPBACKSLASH@
533 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
535 $(AM_V_CC)$(COMPILE) -c $(srcdir)/ldlex-wrapper.c $(NO_WERROR)
538 deffilep.@OBJEXT@: deffilep.c
540 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR)
541 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
544 source='deffilep.c' object='$@' libtool=no @AMDEPBACKSLASH@
545 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
547 $(AM_V_CC)$(COMPILE) -c `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR)
550 SRC_POTFILES = $(CFILES) $(HFILES)
551 BLD_POTFILES = $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
553 po/SRC-POTFILES.in: @MAINT@ Makefile
554 for f in $(SRC_POTFILES); do echo $$f; done | LC_ALL=C sort > $@-tmp \
555 && mv $@-tmp $(srcdir)/po/SRC-POTFILES.in
557 po/BLD-POTFILES.in: @MAINT@ Makefile
558 for f in $(BLD_POTFILES); do echo $$f; done | LC_ALL=C sort > $@-tmp \
559 && mv $@-tmp $(srcdir)/po/BLD-POTFILES.in
561 ldmain.@OBJEXT@: ldmain.c config.status
563 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
564 -DDEFAULT_EMULATION='"$(EMUL)"' \
565 -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \
566 -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
568 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
571 source='ldmain.c' object='$@' libtool=no @AMDEPBACKSLASH@
572 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
574 $(AM_V_CC)$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' \
575 -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \
576 -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
580 ldfile.@OBJEXT@: ldfile.c config.status
582 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
583 -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \
585 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
588 source='ldfile.c' object='$@' libtool=no @AMDEPBACKSLASH@
589 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
591 $(AM_V_CC)$(COMPILE) -c -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' \
592 -DTOOLBINDIR='"$(tooldir)/bin"' \
596 eelf32_spu.@OBJEXT@: eelf32_spu.c
598 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
599 -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" eelf32_spu.c
600 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
603 source='eelf32_spu.c' object='$@' libtool=no @AMDEPBACKSLASH@
604 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
606 $(AM_V_CC)$(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \
610 ldemul-list.h: Makefile
611 (echo "/* This file is automatically generated. DO NOT EDIT! */";\
612 for f in `echo " " ${EMULATION_OFILES} "" \
613 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
614 echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
617 echo "#define EMULATION_LIST \\";\
618 for f in `echo " " ${EMULATION_OFILES} "" \
619 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
620 echo " &ld_$${f}_emulation, \\"; \
622 echo " 0") >ldemul-tmp.h
623 mv ldemul-tmp.h ldemul-list.h
626 $(AM_V_GEN)test -d $(@D) || mkdir $(@D); touch $@
633 GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "$(GENDEPDIR)" "${LIB_PATH}" "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ @enable_initfini_array@
634 GEN_DEPENDS = $(srcdir)/genscripts.sh ldscripts/stamp
639 $(AM_V_GEN)${GENSCRIPTS} $* "$(tdir_$*)"
641 $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
643 #Dummy rule to prevent make considering e%.c as a source for missing
644 #.Pc files (and they are all missing until the e*.c files are generated).
645 #For example, we don't want e.deps/emmo.Pc.c to be tried when
646 #.deps/emmo.Pc is missing.
649 @AMDEP_TRUE@-include $(patsubst %.c,./$(DEPDIR)/%.Pc,$(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES))
651 # We need this for automake to use YLWRAP.
652 EXTRA_ld_new_SOURCES = deffilep.y ldlex.l
653 # Allow dependency tracking to work for these files, too.
654 EXTRA_ld_new_SOURCES += ldelf.c ldelfgen.c pdb.c pep-dll.c pe-dll.c \
655 pep-dll-aarch64.c pep-dll-x86_64.c
657 ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
658 ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c plugin.c \
660 ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) \
661 $(BFDLIB) $(LIBCTF) $(LIBIBERTY) $(LIBINTL_DEP)
662 ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBCTF) \
663 $(LIBIBERTY) $(LIBINTL) $(ZLIB) $(ZSTD_LIBS) $(JANSSON_LIBS)
665 # Dependency tracking for the generated emulation files.
666 EXTRA_ld_new_SOURCES += $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
668 # This is the real libbfd.a and libctf.a created by libtool.
669 TESTBFDLIB = @TESTBFDLIB@
670 TESTCTFLIB = @TESTCTFLIB@
671 TESTSFRAMELIB = @TESTSFRAMELIB@
673 check-DEJAGNU: site.exp
674 (cd .libs; test -e ldscripts || test ! -e ld-new || $(LN_S) ../ldscripts .)
675 srcroot=`cd $(srcdir) && pwd`; export srcroot; \
677 LC_ALL=C; export LC_ALL; \
678 EXPECT=$(EXPECT); export EXPECT; \
679 runtest=$(RUNTEST); \
680 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
681 $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
682 CC="$(CC)" CFLAGS="$(CFLAGS)" \
683 CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \
684 CC_FOR_TARGET="$(CC_FOR_TARGET)" \
685 CFLAGS_FOR_TARGET="$(filter-out -ffile-prefix-map=%,$(CFLAGS_FOR_TARGET))" \
686 CXX_FOR_TARGET="$(CXX_FOR_TARGET)" \
687 CXXFLAGS_FOR_TARGET="$(filter-out -ffile-prefix-map=%,$(CXXFLAGS_FOR_TARGET))" \
688 OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \
689 SFRAMELIB="$(TESTSFRAMELIB)" \
690 JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \
691 LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
692 DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \
694 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
697 development.exp: $(BFDDIR)/development.sh
698 $(AM_V_GEN)$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \
699 | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
702 $(AM_V_GEN)echo "set enable_libctf ${enable_libctf}" >> $@
705 # Build a dummy plugin using libtool.
707 noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
708 libldtestplug3.la libldtestplug4.la
709 libldtestplug_la_SOURCES = testplug.c
710 libldtestplug_la_CFLAGS= -g -O2
711 libldtestplug_la_LDFLAGS = -no-undefined -rpath /nowhere
712 libldtestplug2_la_SOURCES = testplug2.c
713 libldtestplug2_la_CFLAGS= -g -O2
714 libldtestplug2_la_LDFLAGS = -no-undefined -rpath /nowhere
715 libldtestplug3_la_SOURCES = testplug3.c
716 libldtestplug3_la_CFLAGS= -g -O2
717 libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
718 libldtestplug4_la_SOURCES = testplug4.c
719 libldtestplug4_la_CFLAGS= -g -O2
720 libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
722 bfdplugindir = $(libdir)/bfd-plugins
723 bfdplugin_LTLIBRARIES = libdep.la
724 libdep_la_SOURCES = libdep_plugin.c
725 libdep_la_LDFLAGS = -no-undefined -rpath /nowhere -module -avoid-version
726 libdep_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
727 --tag=disable-static \
728 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
729 $(libdep_la_LDFLAGS) $(LDFLAGS) -o $@
731 # DOCUMENTATION TARGETS
732 # Manual configuration file; not usually attached to normal configuration,
733 # because almost all configs use "gen" version of manual.
734 # Set DOCVER above to change.
735 configdoc.texi: ${DOCVER}-doc.texi
736 $(AM_V_GEN)cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
737 $(AM_V_at)chmod u+w ./configdoc.texi
739 # Build the man page from the texinfo file
740 # The sed command removes the no-adjust Nroff command so that
741 # the man output looks standard.
742 ld.1: $(srcdir)/ld.texi configdoc.texi
744 $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texi > ld.pod
745 $(AM_V_at)-($(POD2MAN) ld.pod | \
746 sed -e '/^.if n .na/d' > $@.T$$$$ && \
747 mv -f $@.T$$$$ $@) || \
748 (rm -f $@.T$$$$ && exit 1)
749 $(AM_V_at)rm -f ld.pod
751 # Build the man page from the texinfo file
752 # The sed command removes the no-adjust Nroff command so that
753 # the man output looks standard.
754 ldint.1: $(srcdir)/ldint.texi configdoc.texi
756 $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/ldint.texi > ldint.pod
757 $(AM_V_at)-($(POD2MAN) ldint.pod | \
758 sed -e '/^.if n .na/d' > $@.T$$$$ && \
759 mv -f $@.T$$$$ $@) || \
760 (rm -f $@.T$$$$ && exit 1)
761 $(AM_V_at)rm -f ldint.pod
763 MAINTAINERCLEANFILES = configdoc.texi ld.1 ldint.1
765 # We want to reconfigure if configure.host or configure.tgt changes.
766 # development.sh is used to determine -Werror default.
767 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \
768 $(BFDDIR)/development.sh
770 EXTRA_DEJAGNU_SITE_CONFIG = development.exp enablings.exp
772 MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
773 ldemul-list.h crtbegin.@OBJEXT@ crtend.@OBJEXT@ ld.log ld.sum
776 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s spu_ovl.@OBJEXT@ spu_icache.s spu_icache.@OBJEXT@
778 .PHONY: install-exec-local install-data-local
780 install-exec-local: ld-new$(EXEEXT) install-binPROGRAMS
781 $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
782 n=`echo $(installed_linker) | sed '$(transform)'`; \
783 if test "$(bindir)" != "$(tooldir)/bin"; then \
784 rm -f $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
785 ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT) >/dev/null 2>/dev/null \
786 || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
788 if test "x$(install_as_default)" = "xyes"; then \
789 ld=`echo ld | sed '$(transform)'`; \
790 rm -f $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
791 ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT) >/dev/null 2>/dev/null \
792 || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
793 if test "$(bindir)" != "$(tooldir)/bin"; then \
794 rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
795 ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
796 || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
800 install-data-local: install-bfdpluginLTLIBRARIES
801 $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
802 for f in ldscripts/* ; do \
805 *) $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
808 rm -f $(DESTDIR)$(bfdplugindir)/libdep.la
809 rm -f $(DESTDIR)$(bfdplugindir)/libdep.dll.a
811 # Stuff that should be included in a distribution. The diststuff
812 # target is run by the taz target in ../Makefile.in.
813 EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.@OBJEXT@_c \
814 emultempl/spu_icache.@OBJEXT@_c deffilep.c deffilep.h $(man_MANS)
815 diststuff: info $(EXTRA_DIST)
817 # Both info (ld.info) and ld.1 depend on configdoc.texi.
818 # But info isn't a direct target. Make info-recursive to depend on
819 # ld.1 to support parallel build.
822 html-local: doc/ld/index.html
823 doc/ld/index.html: ld.texi $(ld_TEXINFOS)
824 $(AM_V_at)$(MKDIR_P) doc
825 $(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
826 --split=node -I$(srcdir) $(srcdir)/ld.texi -o doc/ld
828 DISTCLEANFILES = site.exp development.exp enablings.exp site.bak
832 MAINTAINERCLEANFILES += ld.info