1 ## Process this file with automake to generate Makefile.in
3 # Copyright (C) 2012-2023 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 \
217 eelf32_sparc_sol2.c \
218 eelf32_sparc_vxworks.c \
221 eelf32_tic6x_elf_be.c \
222 eelf32_tic6x_elf_le.c \
224 eelf32_tic6x_linux_be.c \
225 eelf32_tic6x_linux_le.c \
232 eelf32epiphany_4x4.c \
253 eelf32microblazeel.c \
283 eelf_i386_vxworks.c \
295 eh8300sxelf_linux.c \
363 etic3xcoff_onchip.c \
375 ALL_EMULATIONS = $(ALL_EMULATION_SOURCES:.c=.@OBJEXT@)
377 ALL_64_EMULATION_SOURCES = \
379 eaarch64cloudabib.c \
399 eelf32briscv_ilp32.c \
400 eelf32briscv_ilp32f.c \
403 eelf32btsmip_fbsd.c \
405 eelf32btsmipn32_fbsd.c \
407 eelf32ebmipvxworks.c \
409 eelf32elmipvxworks.c \
417 eelf32lriscv_ilp32.c \
418 eelf32lriscv_ilp32f.c \
421 eelf32ltsmip_fbsd.c \
423 eelf32ltsmipn32_fbsd.c \
424 eelf32mipswindiss.c \
431 eelf64_sparc_fbsd.c \
432 eelf64_sparc_sol2.c \
439 eelf64briscv_lp64.c \
440 eelf64briscv_lp64f.c \
442 eelf64btsmip_fbsd.c \
450 eelf64lriscv_lp64.c \
451 eelf64lriscv_lp64f.c \
453 eelf64ltsmip_fbsd.c \
460 eelf_mipsel_haiku.c \
462 eelf_x86_64_cloudabi.c \
464 eelf_x86_64_haiku.c \
470 ALL_64_EMULATIONS = $(ALL_64_EMULATION_SOURCES:.c=.@OBJEXT@)
472 ALL_EMUL_EXTRA_OFILES = \
479 ALL_64_EMUL_EXTRA_OFILES = \
482 CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
483 ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
484 mri.c ldcref.c pe-dll.c pep-dll.c ldlex-wrapper.c \
485 plugin.c ldbuildid.c ldelf.c ldelfgen.c \
488 HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
489 ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
490 ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h \
491 elf-hints-local.h plugin.h ldbuildid.h ldelf.h ldelfgen.h \
494 GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
495 GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
497 # Require an early dependency on the generated headers, as the dependency
498 # tracking will not cause them to be built beforehand.
499 BUILT_SOURCES = $(GENERATED_HFILES) @MAINT@ $(GENERATED_CFILES) \
500 $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
502 OFILES = ldgram.@OBJEXT@ ldlex-wrapper.@OBJEXT@ lexsup.@OBJEXT@ ldlang.@OBJEXT@ \
503 mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ plugin.@OBJEXT@ \
504 ldwrite.@OBJEXT@ ldexp.@OBJEXT@ ldemul.@OBJEXT@ ldver.@OBJEXT@ ldmisc.@OBJEXT@ \
505 ldfile.@OBJEXT@ ldcref.@OBJEXT@ ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES} \
508 STAGESTUFF = *.@OBJEXT@ ldscripts/* e*.c
510 # Disable -Werror, if it has been enabled, since old versions of bison/
511 # yacc will produce working code which contain compile time warnings.
512 ldgram.@OBJEXT@: ldgram.c
514 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR)
515 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
518 source='ldgram.c' object='$@' libtool=no @AMDEPBACKSLASH@
519 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
521 $(AM_V_CC)$(COMPILE) -c `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR)
524 ldlex-wrapper.@OBJEXT@: ldlex-wrapper.c ldlex.c
526 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/ldlex-wrapper.c $(NO_WERROR)
527 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
530 source='ldlex-wrapper.c' object='$@' libtool=no @AMDEPBACKSLASH@
531 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
533 $(AM_V_CC)$(COMPILE) -c $(srcdir)/ldlex-wrapper.c $(NO_WERROR)
536 deffilep.@OBJEXT@: deffilep.c
538 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR)
539 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
542 source='deffilep.c' object='$@' libtool=no @AMDEPBACKSLASH@
543 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
545 $(AM_V_CC)$(COMPILE) -c `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR)
548 SRC_POTFILES = $(CFILES) $(HFILES)
549 BLD_POTFILES = $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
551 po/SRC-POTFILES.in: @MAINT@ Makefile
552 for f in $(SRC_POTFILES); do echo $$f; done | LC_ALL=C sort > $@-tmp \
553 && mv $@-tmp $(srcdir)/po/SRC-POTFILES.in
555 po/BLD-POTFILES.in: @MAINT@ Makefile
556 for f in $(BLD_POTFILES); do echo $$f; done | LC_ALL=C sort > $@-tmp \
557 && mv $@-tmp $(srcdir)/po/BLD-POTFILES.in
559 ldmain.@OBJEXT@: ldmain.c config.status
561 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
562 -DDEFAULT_EMULATION='"$(EMUL)"' \
563 -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \
564 -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
566 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
569 source='ldmain.c' object='$@' libtool=no @AMDEPBACKSLASH@
570 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
572 $(AM_V_CC)$(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' \
573 -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \
574 -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
578 ldfile.@OBJEXT@: ldfile.c config.status
580 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
581 -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \
583 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
586 source='ldfile.c' object='$@' libtool=no @AMDEPBACKSLASH@
587 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
589 $(AM_V_CC)$(COMPILE) -c -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' \
590 -DTOOLBINDIR='"$(tooldir)/bin"' \
594 eelf32_spu.@OBJEXT@: eelf32_spu.c
596 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
597 -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" eelf32_spu.c
598 $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
601 source='eelf32_spu.c' object='$@' libtool=no @AMDEPBACKSLASH@
602 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
604 $(AM_V_CC)$(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \
608 ldemul-list.h: Makefile
609 (echo "/* This file is automatically generated. DO NOT EDIT! */";\
610 for f in `echo " " ${EMULATION_OFILES} "" \
611 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
612 echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
615 echo "#define EMULATION_LIST \\";\
616 for f in `echo " " ${EMULATION_OFILES} "" \
617 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
618 echo " &ld_$${f}_emulation, \\"; \
620 echo " 0") >ldemul-tmp.h
621 mv ldemul-tmp.h ldemul-list.h
624 $(AM_V_GEN)test -d $(@D) || mkdir $(@D); touch $@
631 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@
632 GEN_DEPENDS = $(srcdir)/genscripts.sh ldscripts/stamp
637 $(AM_V_GEN)${GENSCRIPTS} $* "$(tdir_$*)"
639 $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
641 #Dummy rule to prevent make considering e%.c as a source for missing
642 #.Pc files (and they are all missing until the e*.c files are generated).
643 #For example, we don't want e.deps/emmo.Pc.c to be tried when
644 #.deps/emmo.Pc is missing.
647 @AMDEP_TRUE@-include $(patsubst %.c,./$(DEPDIR)/%.Pc,$(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES))
649 # We need this for automake to use YLWRAP.
650 EXTRA_ld_new_SOURCES = deffilep.y ldlex.l
651 # Allow dependency tracking to work for these files, too.
652 EXTRA_ld_new_SOURCES += ldelf.c ldelfgen.c pdb.c pep-dll.c pe-dll.c \
653 pep-dll-aarch64.c pep-dll-x86_64.c
655 ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
656 ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c plugin.c \
658 ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) \
659 $(BFDLIB) $(LIBCTF) $(LIBIBERTY) $(LIBINTL_DEP) $(JANSSON_LIBS)
660 ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBCTF) \
661 $(LIBIBERTY) $(LIBINTL) $(ZLIB) $(ZSTD_LIBS) $(JANSSON_LIBS)
663 # Dependency tracking for the generated emulation files.
664 EXTRA_ld_new_SOURCES += $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
666 # This is the real libbfd.a and libctf.a created by libtool.
667 TESTBFDLIB = @TESTBFDLIB@
668 TESTCTFLIB = @TESTCTFLIB@
669 TESTSFRAMELIB = @TESTSFRAMELIB@
671 check-DEJAGNU: site.exp
672 (cd .libs; test -e ldscripts || test ! -e ld-new || $(LN_S) ../ldscripts .)
673 srcroot=`cd $(srcdir) && pwd`; export srcroot; \
675 LC_ALL=C; export LC_ALL; \
676 EXPECT=$(EXPECT); export EXPECT; \
677 runtest=$(RUNTEST); \
678 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
679 $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
680 CC="$(CC)" CFLAGS="$(CFLAGS)" \
681 CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \
682 CC_FOR_TARGET="$(CC_FOR_TARGET)" \
683 CFLAGS_FOR_TARGET="$(filter-out -ffile-prefix-map=%,$(CFLAGS_FOR_TARGET))" \
684 CXX_FOR_TARGET="$(CXX_FOR_TARGET)" \
685 CXXFLAGS_FOR_TARGET="$(filter-out -ffile-prefix-map=%,$(CXXFLAGS_FOR_TARGET))" \
686 OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \
687 SFRAMELIB="$(TESTSFRAMELIB)" \
688 JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \
689 LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
690 DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \
692 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
695 development.exp: $(BFDDIR)/development.sh
696 $(AM_V_GEN)$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \
697 | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
700 $(AM_V_GEN)echo "set enable_libctf ${enable_libctf}" >> $@
703 # Build a dummy plugin using libtool.
705 noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
706 libldtestplug3.la libldtestplug4.la
707 libldtestplug_la_SOURCES = testplug.c
708 libldtestplug_la_CFLAGS= -g -O2
709 libldtestplug_la_LDFLAGS = -no-undefined -rpath /nowhere
710 libldtestplug2_la_SOURCES = testplug2.c
711 libldtestplug2_la_CFLAGS= -g -O2
712 libldtestplug2_la_LDFLAGS = -no-undefined -rpath /nowhere
713 libldtestplug3_la_SOURCES = testplug3.c
714 libldtestplug3_la_CFLAGS= -g -O2
715 libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
716 libldtestplug4_la_SOURCES = testplug4.c
717 libldtestplug4_la_CFLAGS= -g -O2
718 libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
720 bfdplugindir = $(libdir)/bfd-plugins
721 bfdplugin_LTLIBRARIES = libdep.la
722 libdep_la_SOURCES = libdep_plugin.c
723 libdep_la_LDFLAGS = -no-undefined -rpath /nowhere -module -avoid-version
724 libdep_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
725 --tag=disable-static \
726 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
727 $(libdep_la_LDFLAGS) $(LDFLAGS) -o $@
729 # DOCUMENTATION TARGETS
730 # Manual configuration file; not usually attached to normal configuration,
731 # because almost all configs use "gen" version of manual.
732 # Set DOCVER above to change.
733 configdoc.texi: ${DOCVER}-doc.texi
734 $(AM_V_GEN)cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
735 $(AM_V_at)chmod u+w ./configdoc.texi
737 # Build the man page from the texinfo file
738 # The sed command removes the no-adjust Nroff command so that
739 # the man output looks standard.
740 ld.1: $(srcdir)/ld.texi configdoc.texi
742 $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texi > ld.pod
743 $(AM_V_at)-($(POD2MAN) ld.pod | \
744 sed -e '/^.if n .na/d' > $@.T$$$$ && \
745 mv -f $@.T$$$$ $@) || \
746 (rm -f $@.T$$$$ && exit 1)
747 $(AM_V_at)rm -f ld.pod
749 # Build the man page from the texinfo file
750 # The sed command removes the no-adjust Nroff command so that
751 # the man output looks standard.
752 ldint.1: $(srcdir)/ldint.texi configdoc.texi
754 $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/ldint.texi > ldint.pod
755 $(AM_V_at)-($(POD2MAN) ldint.pod | \
756 sed -e '/^.if n .na/d' > $@.T$$$$ && \
757 mv -f $@.T$$$$ $@) || \
758 (rm -f $@.T$$$$ && exit 1)
759 $(AM_V_at)rm -f ldint.pod
761 MAINTAINERCLEANFILES = configdoc.texi ld.1 ldint.1
763 # We want to reconfigure if configure.host or configure.tgt changes.
764 # development.sh is used to determine -Werror default.
765 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \
766 $(BFDDIR)/development.sh
768 EXTRA_DEJAGNU_SITE_CONFIG = development.exp enablings.exp
770 MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
771 ldemul-list.h crtbegin.@OBJEXT@ crtend.@OBJEXT@ ld.log ld.sum
774 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s spu_ovl.@OBJEXT@ spu_icache.s spu_icache.@OBJEXT@
776 .PHONY: install-exec-local install-data-local
778 install-exec-local: ld-new$(EXEEXT) install-binPROGRAMS
779 $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
780 n=`echo $(installed_linker) | sed '$(transform)'`; \
781 if test "$(bindir)" != "$(tooldir)/bin"; then \
782 rm -f $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
783 ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT) >/dev/null 2>/dev/null \
784 || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$(installed_linker)$(EXEEXT); \
786 if test "x$(install_as_default)" = "xyes"; then \
787 ld=`echo ld | sed '$(transform)'`; \
788 rm -f $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
789 ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT) >/dev/null 2>/dev/null \
790 || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(bindir)/$$ld$(EXEEXT); \
791 if test "$(bindir)" != "$(tooldir)/bin"; then \
792 rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
793 ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
794 || $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
798 install-data-local: install-bfdpluginLTLIBRARIES
799 $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
800 for f in ldscripts/* ; do \
803 *) $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
806 rm -f $(DESTDIR)$(bfdplugindir)/libdep.la
807 rm -f $(DESTDIR)$(bfdplugindir)/libdep.dll.a
809 # Stuff that should be included in a distribution. The diststuff
810 # target is run by the taz target in ../Makefile.in.
811 EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.@OBJEXT@_c \
812 emultempl/spu_icache.@OBJEXT@_c deffilep.c deffilep.h $(man_MANS)
813 diststuff: info $(EXTRA_DIST)
815 # Both info (ld.info) and ld.1 depend on configdoc.texi.
816 # But info isn't a direct target. Make info-recursive to depend on
817 # ld.1 to support parallel build.
820 html-local: doc/ld/index.html
821 doc/ld/index.html: ld.texi $(ld_TEXINFOS)
822 $(AM_V_at)$(MKDIR_P) doc
823 $(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
824 --split=node -I$(srcdir) $(srcdir)/ld.texi -o doc/ld
826 DISTCLEANFILES = site.exp development.exp enablings.exp site.bak
830 MAINTAINERCLEANFILES += ld.info