Automatic makefile dependencies for generated ld/e*.c

Message ID 20190413031646.GN14424@bubble.grove.modra.org
State New
Headers show
Series
  • Automatic makefile dependencies for generated ld/e*.c
Related show

Commit Message

Alan Modra April 13, 2019, 3:16 a.m.
This patch modifies genscripts.sh to emit dependency info along with
the generated emulation e*.c files.  This is done by a new source_sh
function that records its arg to a file (.deps/e*.Tc), using the
function whenever a shell script is sourced.  Entries in the file are
made unique and written to .deps/e*.Pc.  These files are then
included by the Makefile.

	* Makefile.am (GENSCRIPTS): Pass LIB_PATH as a parameter.  Add
	DEPDIR parameter.
	(ELF_DEPS, ELF_GEN_DEPS, ELF_X86_DEPS): Delete.
	(ALL_EMULATION_SOURCES, ALL_64_EMULATION_SOURCES): Depend on
	$GEN_DEPENDS.
	(e*.c): Delete all dependencies, instead include dependencies
	from $DEPDIR/*.Pc.
	* Makefile.in: Regenerate.
	* configure.ac (source_sh): Define and use function.
	* configure: Regenerate.
	* emulparams/aarch64cloudabib.sh, * emulparams/aarch64elf32b.sh,
	* emulparams/aarch64elfb.sh, * emulparams/aarch64fbsdb.sh,
	* emulparams/aarch64linux32b.sh, * emulparams/aarch64linuxb.sh,
	* emulparams/arcelf.sh, * emulparams/arcelf_prof.sh,
	* emulparams/arclinux.sh, * emulparams/arclinux_nps.sh,
	* emulparams/arclinux_prof.sh, * emulparams/arcv2elf.sh,
	* emulparams/arcv2elfx.sh, * emulparams/armelf_fbsd.sh,
	* emulparams/armelf_linux_eabi.sh,
	* emulparams/armelf_linux_fdpiceabi.sh,
	* emulparams/armelf_nacl.sh, * emulparams/armelf_nbsd.sh,
	* emulparams/armelf_vxworks.sh, * emulparams/armelfb.sh,
	* emulparams/armelfb_fbsd.sh, * emulparams/armelfb_fuchsia.sh,
	* emulparams/armelfb_linux.sh, * emulparams/armelfb_linux_eabi.sh,
	* emulparams/armelfb_linux_fdpiceabi.sh,
	* emulparams/armelfb_nacl.sh, * emulparams/armelfb_nbsd.sh,
	* emulparams/armsymbian.sh, * emulparams/cskyelf_linux.sh,
	* emulparams/elf32_sparc_sol2.sh,
	* emulparams/elf32_sparc_vxworks.sh, * emulparams/elf32_tic6x_be.sh,
	* emulparams/elf32_tic6x_elf_be.sh,
	* emulparams/elf32_tic6x_elf_le.sh,
	* emulparams/elf32_tic6x_linux_be.sh,
	* emulparams/elf32_tic6x_linux_le.sh,
	* emulparams/elf32_x86_64.sh, * emulparams/elf32_x86_64_nacl.sh,
	* emulparams/elf32b4300.sh, * emulparams/elf32bfinfd.sh,
	* emulparams/elf32bmipn32.sh, * emulparams/elf32bsmip.sh,
	* emulparams/elf32btsmip.sh, * emulparams/elf32btsmip_fbsd.sh,
	* emulparams/elf32btsmipn32.sh, * emulparams/elf32btsmipn32_fbsd.sh,
	* emulparams/elf32ebmip.sh, * emulparams/elf32ebmipvxworks.sh,
	* emulparams/elf32elmip.sh, * emulparams/elf32elmipvxworks.sh,
	* emulparams/elf32frvfd.sh, * emulparams/elf32l4300.sh,
	* emulparams/elf32lm32fd.sh, * emulparams/elf32lmip.sh,
	* emulparams/elf32lppc.sh, * emulparams/elf32lppclinux.sh,
	* emulparams/elf32lppcnto.sh, * emulparams/elf32lppcsim.sh,
	* emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh,
	* emulparams/elf32lriscv.sh, * emulparams/elf32lriscv_ilp32.sh,
	* emulparams/elf32lriscv_ilp32f.sh, * emulparams/elf32lsmip.sh,
	* emulparams/elf32ltsmip.sh, * emulparams/elf32ltsmip_fbsd.sh,
	* emulparams/elf32ltsmipn32.sh, * emulparams/elf32ltsmipn32_fbsd.sh,
	* emulparams/elf32microblazeel.sh, * emulparams/elf32or1k_linux.sh,
	* emulparams/elf32ppc.sh, * emulparams/elf32ppc_fbsd.sh,
	* emulparams/elf32ppccommon.sh, * emulparams/elf32ppclinux.sh,
	* emulparams/elf32ppcnto.sh, * emulparams/elf32ppcsim.sh,
	* emulparams/elf32ppcvxworks.sh, * emulparams/elf32ppcwindiss.sh,
	* emulparams/elf32tilegx_be.sh, * emulparams/elf64_ia64_fbsd.sh,
	* emulparams/elf64_sparc_fbsd.sh, * emulparams/elf64_sparc_sol2.sh,
	* emulparams/elf64alpha_fbsd.sh, * emulparams/elf64alpha_nbsd.sh,
	* emulparams/elf64bmip-defs.sh, * emulparams/elf64bmip.sh,
	* emulparams/elf64btsmip.sh, * emulparams/elf64btsmip_fbsd.sh,
	* emulparams/elf64lppc.sh, * emulparams/elf64lriscv-defs.sh,
	* emulparams/elf64lriscv.sh, * emulparams/elf64lriscv_lp64.sh,
	* emulparams/elf64lriscv_lp64f.sh, * emulparams/elf64ltsmip.sh,
	* emulparams/elf64ltsmip_fbsd.sh, * emulparams/elf64ppc.sh,
	* emulparams/elf64ppc_fbsd.sh, * emulparams/elf64rdos.sh,
	* emulparams/elf64tilegx_be.sh, * emulparams/elf_i386.sh,
	* emulparams/elf_i386_be.sh, * emulparams/elf_i386_fbsd.sh,
	* emulparams/elf_i386_ldso.sh, * emulparams/elf_i386_nacl.sh,
	* emulparams/elf_i386_sol2.sh, * emulparams/elf_i386_vxworks.sh,
	* emulparams/elf_iamcu.sh, * emulparams/elf_k1om.sh,
	* emulparams/elf_k1om_fbsd.sh, * emulparams/elf_l1om.sh,
	* emulparams/elf_l1om_fbsd.sh, * emulparams/elf_x86_64.sh,
	* emulparams/elf_x86_64_cloudabi.sh,
	* emulparams/elf_x86_64_fbsd.sh, * emulparams/elf_x86_64_nacl.sh,
	* emulparams/elf_x86_64_sol2.sh, * emulparams/h8300helf.sh,
	* emulparams/h8300helf_linux.sh, * emulparams/h8300hnelf.sh,
	* emulparams/h8300self.sh, * emulparams/h8300self_linux.sh,
	* emulparams/h8300snelf.sh, * emulparams/h8300sxelf.sh,
	* emulparams/h8300sxelf_linux.sh, * emulparams/h8300sxnelf.sh,
	* emulparams/hppanbsd.sh, * emulparams/hppaobsd.sh,
	* emulparams/m32rlelf.sh, * emulparams/m32rlelf_linux.sh,
	* emulparams/m68kelfnbsd.sh, * emulparams/mn10300.sh,
	* emulparams/msp430X.sh, * emulparams/nds32belf.sh,
	* emulparams/nds32belf16m.sh, * emulparams/nds32belf_linux.sh,
	* emulparams/pjlelf.sh, * emulparams/ppclynx.sh,
	* emulparams/score7_elf.sh, * emulparams/shelf_fd.sh,
	* emulparams/shelf_linux.sh, * emulparams/shelf_nbsd.sh,
	* emulparams/shelf_uclinux.sh, * emulparams/shelf_vxworks.sh,
	* emulparams/shl.sh, * emulparams/shlelf.sh,
	* emulparams/shlelf_fd.sh, * emulparams/shlelf_nbsd.sh,
	* emulparams/shlelf_vxworks.sh: Use source_sh.
	* genscripts.sh: Adjust for changed parameters.  Emit dependencies
	for e*.c to .deps/*.Pc.
	(source_sh): New function, use it throughout to source scripts.
	* genscrba.sh (source_em): Use source_sh.


-- 
Alan Modra
Australia Development Lab, IBM

Comments

H.J. Lu April 17, 2019, 6:11 p.m. | #1
On Fri, Apr 12, 2019 at 8:17 PM Alan Modra <amodra@gmail.com> wrote:
>

> This patch modifies genscripts.sh to emit dependency info along with

> the generated emulation e*.c files.  This is done by a new source_sh

> function that records its arg to a file (.deps/e*.Tc), using the

> function whenever a shell script is sourced.  Entries in the file are

> made unique and written to .deps/e*.Pc.  These files are then

> included by the Makefile.

>

>         * Makefile.am (GENSCRIPTS): Pass LIB_PATH as a parameter.  Add

>         DEPDIR parameter.

>         (ELF_DEPS, ELF_GEN_DEPS, ELF_X86_DEPS): Delete.

>         (ALL_EMULATION_SOURCES, ALL_64_EMULATION_SOURCES): Depend on

>         $GEN_DEPENDS.

>         (e*.c): Delete all dependencies, instead include dependencies

>         from $DEPDIR/*.Pc.

>         * Makefile.in: Regenerate.

>         * configure.ac (source_sh): Define and use function.

>         * configure: Regenerate.

>         * emulparams/aarch64cloudabib.sh, * emulparams/aarch64elf32b.sh,

>         * emulparams/aarch64elfb.sh, * emulparams/aarch64fbsdb.sh,

>         * emulparams/aarch64linux32b.sh, * emulparams/aarch64linuxb.sh,

>         * emulparams/arcelf.sh, * emulparams/arcelf_prof.sh,

>         * emulparams/arclinux.sh, * emulparams/arclinux_nps.sh,

>         * emulparams/arclinux_prof.sh, * emulparams/arcv2elf.sh,

>         * emulparams/arcv2elfx.sh, * emulparams/armelf_fbsd.sh,

>         * emulparams/armelf_linux_eabi.sh,

>         * emulparams/armelf_linux_fdpiceabi.sh,

>         * emulparams/armelf_nacl.sh, * emulparams/armelf_nbsd.sh,

>         * emulparams/armelf_vxworks.sh, * emulparams/armelfb.sh,

>         * emulparams/armelfb_fbsd.sh, * emulparams/armelfb_fuchsia.sh,

>         * emulparams/armelfb_linux.sh, * emulparams/armelfb_linux_eabi.sh,

>         * emulparams/armelfb_linux_fdpiceabi.sh,

>         * emulparams/armelfb_nacl.sh, * emulparams/armelfb_nbsd.sh,

>         * emulparams/armsymbian.sh, * emulparams/cskyelf_linux.sh,

>         * emulparams/elf32_sparc_sol2.sh,

>         * emulparams/elf32_sparc_vxworks.sh, * emulparams/elf32_tic6x_be.sh,

>         * emulparams/elf32_tic6x_elf_be.sh,

>         * emulparams/elf32_tic6x_elf_le.sh,

>         * emulparams/elf32_tic6x_linux_be.sh,

>         * emulparams/elf32_tic6x_linux_le.sh,

>         * emulparams/elf32_x86_64.sh, * emulparams/elf32_x86_64_nacl.sh,

>         * emulparams/elf32b4300.sh, * emulparams/elf32bfinfd.sh,

>         * emulparams/elf32bmipn32.sh, * emulparams/elf32bsmip.sh,

>         * emulparams/elf32btsmip.sh, * emulparams/elf32btsmip_fbsd.sh,

>         * emulparams/elf32btsmipn32.sh, * emulparams/elf32btsmipn32_fbsd.sh,

>         * emulparams/elf32ebmip.sh, * emulparams/elf32ebmipvxworks.sh,

>         * emulparams/elf32elmip.sh, * emulparams/elf32elmipvxworks.sh,

>         * emulparams/elf32frvfd.sh, * emulparams/elf32l4300.sh,

>         * emulparams/elf32lm32fd.sh, * emulparams/elf32lmip.sh,

>         * emulparams/elf32lppc.sh, * emulparams/elf32lppclinux.sh,

>         * emulparams/elf32lppcnto.sh, * emulparams/elf32lppcsim.sh,

>         * emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh,

>         * emulparams/elf32lriscv.sh, * emulparams/elf32lriscv_ilp32.sh,

>         * emulparams/elf32lriscv_ilp32f.sh, * emulparams/elf32lsmip.sh,

>         * emulparams/elf32ltsmip.sh, * emulparams/elf32ltsmip_fbsd.sh,

>         * emulparams/elf32ltsmipn32.sh, * emulparams/elf32ltsmipn32_fbsd.sh,

>         * emulparams/elf32microblazeel.sh, * emulparams/elf32or1k_linux.sh,

>         * emulparams/elf32ppc.sh, * emulparams/elf32ppc_fbsd.sh,

>         * emulparams/elf32ppccommon.sh, * emulparams/elf32ppclinux.sh,

>         * emulparams/elf32ppcnto.sh, * emulparams/elf32ppcsim.sh,

>         * emulparams/elf32ppcvxworks.sh, * emulparams/elf32ppcwindiss.sh,

>         * emulparams/elf32tilegx_be.sh, * emulparams/elf64_ia64_fbsd.sh,

>         * emulparams/elf64_sparc_fbsd.sh, * emulparams/elf64_sparc_sol2.sh,

>         * emulparams/elf64alpha_fbsd.sh, * emulparams/elf64alpha_nbsd.sh,

>         * emulparams/elf64bmip-defs.sh, * emulparams/elf64bmip.sh,

>         * emulparams/elf64btsmip.sh, * emulparams/elf64btsmip_fbsd.sh,

>         * emulparams/elf64lppc.sh, * emulparams/elf64lriscv-defs.sh,

>         * emulparams/elf64lriscv.sh, * emulparams/elf64lriscv_lp64.sh,

>         * emulparams/elf64lriscv_lp64f.sh, * emulparams/elf64ltsmip.sh,

>         * emulparams/elf64ltsmip_fbsd.sh, * emulparams/elf64ppc.sh,

>         * emulparams/elf64ppc_fbsd.sh, * emulparams/elf64rdos.sh,

>         * emulparams/elf64tilegx_be.sh, * emulparams/elf_i386.sh,

>         * emulparams/elf_i386_be.sh, * emulparams/elf_i386_fbsd.sh,

>         * emulparams/elf_i386_ldso.sh, * emulparams/elf_i386_nacl.sh,

>         * emulparams/elf_i386_sol2.sh, * emulparams/elf_i386_vxworks.sh,

>         * emulparams/elf_iamcu.sh, * emulparams/elf_k1om.sh,

>         * emulparams/elf_k1om_fbsd.sh, * emulparams/elf_l1om.sh,

>         * emulparams/elf_l1om_fbsd.sh, * emulparams/elf_x86_64.sh,

>         * emulparams/elf_x86_64_cloudabi.sh,

>         * emulparams/elf_x86_64_fbsd.sh, * emulparams/elf_x86_64_nacl.sh,

>         * emulparams/elf_x86_64_sol2.sh, * emulparams/h8300helf.sh,

>         * emulparams/h8300helf_linux.sh, * emulparams/h8300hnelf.sh,

>         * emulparams/h8300self.sh, * emulparams/h8300self_linux.sh,

>         * emulparams/h8300snelf.sh, * emulparams/h8300sxelf.sh,

>         * emulparams/h8300sxelf_linux.sh, * emulparams/h8300sxnelf.sh,

>         * emulparams/hppanbsd.sh, * emulparams/hppaobsd.sh,

>         * emulparams/m32rlelf.sh, * emulparams/m32rlelf_linux.sh,

>         * emulparams/m68kelfnbsd.sh, * emulparams/mn10300.sh,

>         * emulparams/msp430X.sh, * emulparams/nds32belf.sh,

>         * emulparams/nds32belf16m.sh, * emulparams/nds32belf_linux.sh,

>         * emulparams/pjlelf.sh, * emulparams/ppclynx.sh,

>         * emulparams/score7_elf.sh, * emulparams/shelf_fd.sh,

>         * emulparams/shelf_linux.sh, * emulparams/shelf_nbsd.sh,

>         * emulparams/shelf_uclinux.sh, * emulparams/shelf_vxworks.sh,

>         * emulparams/shl.sh, * emulparams/shlelf.sh,

>         * emulparams/shlelf_fd.sh, * emulparams/shlelf_nbsd.sh,

>         * emulparams/shlelf_vxworks.sh: Use source_sh.

>         * genscripts.sh: Adjust for changed parameters.  Emit dependencies

>         for e*.c to .deps/*.Pc.

>         (source_sh): New function, use it throughout to source scripts.

>         * genscrba.sh (source_em): Use source_sh.

>


This breaks AMDEP with in-tree build:

[hjl@gnu-4 ld]$ /bin/sh ./genscripts.sh "." "/usr/lib64" "/usr" "/usr"
x86_64-redhat-linux-gnu x86_64-redhat-linux-gnu x86_64-redhat-linux
".deps" "" "elf_x86_64 elf_i386 elf32_x86_64 elf_l1om elf_k1om
i386pep" "/usr/local/lib /lib /usr/lib" yes yes i386pep "x86_64-pep"
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory
cat: .deps/ei386pep.Tc: No such file or directory
./genscripts.sh: line 650: .deps/ei386pep.Pc: No such file or directory
[hjl@gnu-4 ld]$

H.J.
Alan Modra April 23, 2019, 7:36 a.m. | #2
On Wed, Apr 17, 2019 at 11:11:59AM -0700, H.J. Lu wrote:
> This breaks AMDEP with in-tree build:

> 

> [hjl@gnu-4 ld]$ /bin/sh ./genscripts.sh "." "/usr/lib64" "/usr" "/usr"

> x86_64-redhat-linux-gnu x86_64-redhat-linux-gnu x86_64-redhat-linux

> ".deps" "" "elf_x86_64 elf_i386 elf32_x86_64 elf_l1om elf_k1om

> i386pep" "/usr/local/lib /lib /usr/lib" yes yes i386pep "x86_64-pep"

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> cat: .deps/ei386pep.Tc: No such file or directory

> ./genscripts.sh: line 650: .deps/ei386pep.Pc: No such file or directory

> [hjl@gnu-4 ld]$


I don't usually build in the source tree, but when I did just now I
didn't see this.  Were you building in a tree that had already been
configured before updating the source?

Hmm, I can see that we might get this sort of failure with
--enable-dependency-tracking=no since the .deps dir won't be created
when configuring.

	* Makefile.am (GENDEPDIR): New var, used..
	(GENSCRIPTS): ..here.
	* Makefile.in: Regenerate.
	* genscripts.sh: Test for $DEPDIR set before every use.

diff --git a/ld/Makefile.am b/ld/Makefile.am
index 0e9dc862e5..4a0bb15227 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -152,6 +152,7 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
 BFDLIB = ../bfd/libbfd.la
 LIBIBERTY = ../libiberty/libiberty.a
 
+# These all start with e so 'make clean' can find them.
 ALL_EMULATION_SOURCES = \
 	eaix5ppc.c \
 	eaix5rs6.c \
@@ -611,9 +612,12 @@ ldemul-list.h: Makefile
 stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
 	  cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
 
-# These all start with e so 'make clean' can find them.
-
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "${DEPDIR}" "${LIB_PATH}" "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ @enable_initfini_array@
+if AMDEP
+  GENDEPDIR=$(DEPDIR)
+else
+  GENDEPDIR=
+endif
+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@
 GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
 
 @TDIRS@
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index 7ee03d2b1c..cb2b081e9e 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -129,11 +129,15 @@ TOOL_LIB=$2
 
 source_sh()
 {
-  echo $1 >> ${DEPDIR}/e${EMULATION_NAME}.Tc
+  if test -n "${DEPDIR}"; then
+    echo $1 >> ${DEPDIR}/e${EMULATION_NAME}.Tc
+  fi
   . $1
 }
 
-rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
+if test -n "${DEPDIR}"; then
+  rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
+fi
 
 # Include the emulation-specific parameters:
 CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${EMULATION_NAME}.sh"
@@ -639,12 +643,14 @@ fi
 > e${EMULATION_NAME}.c

 source_em ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em
 
-ecdeps=
-for dep in `cat ${DEPDIR}/e${EMULATION_NAME}.Tc`; do
-  case " $ecdeps " in
-    *" $dep "*): ;;
-    *) ecdeps="$ecdeps $dep" ;;
-  esac
-done
-rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
-echo "e${EMULATION_NAME}.c:${ecdeps}" > ${DEPDIR}/e${EMULATION_NAME}.Pc
+if test -n "${DEPDIR}"; then
+  ecdeps=
+  for dep in `cat ${DEPDIR}/e${EMULATION_NAME}.Tc`; do
+    case " $ecdeps " in
+      *" $dep "*): ;;
+      *) ecdeps="$ecdeps $dep" ;;
+    esac
+  done
+  rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
+  echo "e${EMULATION_NAME}.c:${ecdeps}" > ${DEPDIR}/e${EMULATION_NAME}.Pc
+fi

-- 
Alan Modra
Australia Development Lab, IBM
H.J. Lu April 23, 2019, 4:14 p.m. | #3
On Tue, Apr 23, 2019 at 12:36 AM Alan Modra <amodra@gmail.com> wrote:
>

> On Wed, Apr 17, 2019 at 11:11:59AM -0700, H.J. Lu wrote:

> > This breaks AMDEP with in-tree build:

> >

> > [hjl@gnu-4 ld]$ /bin/sh ./genscripts.sh "." "/usr/lib64" "/usr" "/usr"

> > x86_64-redhat-linux-gnu x86_64-redhat-linux-gnu x86_64-redhat-linux

> > ".deps" "" "elf_x86_64 elf_i386 elf32_x86_64 elf_l1om elf_k1om

> > i386pep" "/usr/local/lib /lib /usr/lib" yes yes i386pep "x86_64-pep"

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 132: .deps/ei386pep.Tc: No such file or directory

> > cat: .deps/ei386pep.Tc: No such file or directory

> > ./genscripts.sh: line 650: .deps/ei386pep.Pc: No such file or directory

> > [hjl@gnu-4 ld]$

>

> I don't usually build in the source tree, but when I did just now I

> didn't see this.  Were you building in a tree that had already been

> configured before updating the source?

>

> Hmm, I can see that we might get this sort of failure with

> --enable-dependency-tracking=no since the .deps dir won't be created

> when configuring.


Yes, it was configured with --disable-dependency-tracking


>         * Makefile.am (GENDEPDIR): New var, used..

>         (GENSCRIPTS): ..here.

>         * Makefile.in: Regenerate.

>         * genscripts.sh: Test for $DEPDIR set before every use.

>

> diff --git a/ld/Makefile.am b/ld/Makefile.am

> index 0e9dc862e5..4a0bb15227 100644

> --- a/ld/Makefile.am

> +++ b/ld/Makefile.am

> @@ -152,6 +152,7 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \

>  BFDLIB = ../bfd/libbfd.la

>  LIBIBERTY = ../libiberty/libiberty.a

>

> +# These all start with e so 'make clean' can find them.

>  ALL_EMULATION_SOURCES = \

>         eaix5ppc.c \

>         eaix5rs6.c \

> @@ -611,9 +612,12 @@ ldemul-list.h: Makefile

>  stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)

>           cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed

>

> -# These all start with e so 'make clean' can find them.

> -

> -GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "${DEPDIR}" "${LIB_PATH}" "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ @enable_initfini_array@

> +if AMDEP

> +  GENDEPDIR=$(DEPDIR)

> +else

> +  GENDEPDIR=

> +endif

> +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@

>  GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed

>

>  @TDIRS@

> diff --git a/ld/genscripts.sh b/ld/genscripts.sh

> index 7ee03d2b1c..cb2b081e9e 100755

> --- a/ld/genscripts.sh

> +++ b/ld/genscripts.sh

> @@ -129,11 +129,15 @@ TOOL_LIB=$2

>

>  source_sh()

>  {

> -  echo $1 >> ${DEPDIR}/e${EMULATION_NAME}.Tc

> +  if test -n "${DEPDIR}"; then

> +    echo $1 >> ${DEPDIR}/e${EMULATION_NAME}.Tc

> +  fi

>    . $1

>  }

>

> -rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc

> +if test -n "${DEPDIR}"; then

> +  rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc

> +fi

>

>  # Include the emulation-specific parameters:

>  CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${EMULATION_NAME}.sh"

> @@ -639,12 +643,14 @@ fi

>  > e${EMULATION_NAME}.c

>  source_em ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em

>

> -ecdeps=

> -for dep in `cat ${DEPDIR}/e${EMULATION_NAME}.Tc`; do

> -  case " $ecdeps " in

> -    *" $dep "*): ;;

> -    *) ecdeps="$ecdeps $dep" ;;

> -  esac

> -done

> -rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc

> -echo "e${EMULATION_NAME}.c:${ecdeps}" > ${DEPDIR}/e${EMULATION_NAME}.Pc

> +if test -n "${DEPDIR}"; then

> +  ecdeps=

> +  for dep in `cat ${DEPDIR}/e${EMULATION_NAME}.Tc`; do

> +    case " $ecdeps " in

> +      *" $dep "*): ;;

> +      *) ecdeps="$ecdeps $dep" ;;

> +    esac

> +  done

> +  rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc

> +  echo "e${EMULATION_NAME}.c:${ecdeps}" > ${DEPDIR}/e${EMULATION_NAME}.Pc

> +fi

>

> --

> Alan Modra

> Australia Development Lab, IBM


Thanks.

-- 
H.J.

Patch

diff --git a/ld/Makefile.am b/ld/Makefile.am
index 7f8722dc2d..0e9dc862e5 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -613,17 +613,8 @@  stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
 
 # These all start with e so 'make clean' can find them.
 
-GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ @enable_initfini_array@
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "${DEPDIR}" "${LIB_PATH}" "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ @enable_initfini_array@
 GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
-ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/scripttempl/DWARF.sc
-ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em $(srcdir)/scripttempl/DWARF.sc
-ELF_X86_DEPS = $(ELF_DEPS) $(srcdir)/emultempl/elf-x86.em \
-	       $(srcdir)/emulparams/plt_unwind.sh \
-	       $(srcdir)/emulparams/extern_protected_data.sh \
-	       $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-	       $(srcdir)/emulparams/reloc_overflow.sh \
-	       $(srcdir)/emulparams/call_nop.sh \
-	       $(srcdir)/emulparams/cet.sh
 
 @TDIRS@
 
@@ -637,1247 +628,319 @@  run-genscripts:
 
 .PHONY: run-genscripts
 
-$(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES):
+$(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
 	base=`echo $@ | sed -e 's,e\(.*\).c,\1,'`; \
 	$(MAKE) run-genscripts "script_target=$$base" "script_tdirname=tdir_$$base"
 
-eaix5ppc.c: $(srcdir)/emulparams/aix5ppc.sh \
-  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
-
-eaix5rs6.c: $(srcdir)/emulparams/aix5rs6.sh \
-  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
-
-eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
-  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
-
-eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
-  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
-
-ealpha.c: $(srcdir)/emulparams/alpha.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
-
-ealphavms.c: $(srcdir)/emulparams/alphavms.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/vms.em \
-  $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/alphavms.sc ${GEN_DEPENDS}
-
-earcv2elf.c: $(srcdir)/emulparams/arcv2elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elfarcv2.sc ${GEN_DEPENDS}
-
-earcv2elfx.c: $(srcdir)/emulparams/arcv2elfx.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elfarcv2.sc ${GEN_DEPENDS}
-
-earcelf.c: $(srcdir)/emulparams/arcelf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elfarc.sc ${GEN_DEPENDS}
-
-earcelf_prof.c: $(srcdir)/emulparams/arcelf_prof.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elfarc.sc ${GEN_DEPENDS}
-
-#for linux on arc
-earclinux.c: $(srcdir)/emulparams/arclinux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/arclinux.em \
-  $(srcdir)/scripttempl/arclinux.sc ${GEN_DEPENDS}
-
-earclinux_nps.c: $(srcdir)/emulparams/arclinux_nps.sh \
-  $(srcdir)/emulparams/arc-nps.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/arclinux.em \
-  $(srcdir)/scripttempl/arclinux.sc ${GEN_DEPENDS}
-
-earclinux_prof.c: $(srcdir)/emulparams/arclinux_prof.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/arclinux.em \
-  $(srcdir)/scripttempl/arclinux.sc ${GEN_DEPENDS}
-
-earm_wince_pe.c: $(srcdir)/emulparams/arm_wince_pe.sh \
-  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
-
-earmelf.c: $(srcdir)/emulparams/armelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
-  $(srcdir)/emulparams/armelf.sh $(srcdir)/emulparams/elf_fbsd.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelf_fuchsia.c: $(srcdir)/emulparams/armelf_fuchsia.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
-  $(srcdir)/emulparams/armelf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelf_linux_fdpiceabi.c: $(srcdir)/emulparams/armelf_linux_fdpiceabi.sh \
-  $(srcdir)/emulparams/armelf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelf_nacl.c: $(srcdir)/emulparams/armelf_nacl.sh \
-  $(srcdir)/emulparams/armelf_linux_eabi.sh \
-  $(srcdir)/emulparams/armelf_linux.sh \
-  $(srcdir)/emulparams/elf_nacl.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
-  $(srcdir)/emulparams/armelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelf_phoenix.c: $(srcdir)/emulparams/armelf_phoenix.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
-  $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
-  $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelfb_fbsd.c: $(srcdir)/emulparams/armelfb_fbsd.sh \
-  $(srcdir)/emulparams/armelf_fbsd.sh \
-  $(srcdir)/emulparams/armelf.sh $(srcdir)/emulparams/elf_fbsd.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelfb_fuchsia.c: $(srcdir)/emulparams/armelfb_fuchsia.sh \
-  $(srcdir)/emulparams/armelf_fuchsia.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
-  $(srcdir)/emulparams/armelf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
-  $(srcdir)/emulparams/armelf_linux_eabi.sh \
-  $(srcdir)/emulparams/armelf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelfb_linux_fdpiceabi.c: $(srcdir)/emulparams/armelfb_linux_fdpiceabi.sh \
-  $(srcdir)/emulparams/armelf_linux_fdpiceabi.sh \
-  $(srcdir)/emulparams/armelf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelfb_nacl.c: $(srcdir)/emulparams/armelfb_nacl.sh \
-  $(srcdir)/emulparams/armelf_nacl.sh \
-  $(srcdir)/emulparams/armelf_linux_eabi.sh \
-  $(srcdir)/emulparams/armelf_linux.sh \
-  $(srcdir)/emulparams/elf_nacl.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
-  $(srcdir)/emulparams/armelf_nbsd.sh \
-  $(srcdir)/emulparams/armelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmnto.c: $(srcdir)/emulparams/armnto.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-earmpe.c: $(srcdir)/emulparams/armpe.sh \
-  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
-
-earmsymbian.c: $(srcdir)/emulparams/armsymbian.sh \
-  $(srcdir)/emulparams/armelf.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/armbpabi.sc \
-  ${GEN_DEPENDS}
-
-eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavr2.c: $(srcdir)/emulparams/avr2.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavr25.c: $(srcdir)/emulparams/avr25.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavr31.c: $(srcdir)/emulparams/avr31.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavr35.c: $(srcdir)/emulparams/avr35.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavr51.c: $(srcdir)/emulparams/avr51.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavrxmega1.c: $(srcdir)/emulparams/avrxmega1.sh \
-  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavrxmega2.c: $(srcdir)/emulparams/avrxmega2.sh \
-  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavrxmega3.c: $(srcdir)/emulparams/avrxmega3.sh \
-  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavrxmega4.c: $(srcdir)/emulparams/avrxmega4.sh \
-  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavrxmega5.c: $(srcdir)/emulparams/avrxmega5.sh \
-  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavrxmega6.c: $(srcdir)/emulparams/avrxmega6.sh \
-  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavrxmega7.c: $(srcdir)/emulparams/avrxmega7.sh \
-  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-eavrtiny.c: $(srcdir)/emulparams/avrtiny.sh \
-  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-  ${GEN_DEPENDS}
-
-ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS}
-
-ecriself.c: $(srcdir)/emulparams/criself.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ecskyelf.c: $(srcdir)/emulparams/cskyelf.sh \
-  $(srcdir)/emultempl/cskyelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ecskyelf_linux.c: $(srcdir)/emulparams/cskyelf_linux.sh \
-  $(srcdir)/emulparams/cskyelf.sh $(srcdir)/emultempl/cskyelf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
-
-ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
-
-ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
-
-ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
-
-eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
-
-eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32_sparc_sol2.c: $(srcdir)/emulparams/elf32_sparc_sol2.sh \
-  $(srcdir)/emulparams/elf32_sparc.sh \
-  $(srcdir)/emulparams/solaris2.sh \
-  $(srcdir)/emultempl/solaris2.em $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \
-  $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/elf32_sparc.sh \
-  $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \
-  $(srcdir)/emultempl/spu_ovl.@OBJEXT@_c $(srcdir)/emultempl/spu_icache.@OBJEXT@_c \
-  ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-$(srcdir)/emultempl/spu_ovl.@OBJEXT@_c: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
-	if ../gas/as-new --version \
-		| grep 'target.*spu' >/dev/null 2>/dev/null; then \
-	  cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s; \
-	  ../gas/as-new -o spu_ovl.@OBJEXT@ spu_ovl.s; \
-	  ../binutils/bin2c <spu_ovl.@OBJEXT@ >$@; \
-	fi
-$(srcdir)/emultempl/spu_icache.@OBJEXT@_c: @MAINT@ $(srcdir)/emultempl/spu_icache.S
-	if ../gas/as-new --version \
-		| grep 'target.*spu' >/dev/null 2>/dev/null; then \
-	  cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_icache.S spu_icache.s; \
-	  ../gas/as-new -o spu_icache.@OBJEXT@ spu_icache.s; \
-	  ../binutils/bin2c <spu_icache.@OBJEXT@ >$@; \
-	fi
-eelf32_tic6x_be.c: $(srcdir)/emulparams/elf32_tic6x_be.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/tic6xdsbt.em \
-  ${GEN_DEPENDS}
-
-eelf32_tic6x_elf_be.c: $(srcdir)/emulparams/elf32_tic6x_elf_be.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc  $(srcdir)/emultempl/tic6xdsbt.em \
-  ${GEN_DEPENDS}
-
-eelf32_tic6x_elf_le.c: $(srcdir)/emulparams/elf32_tic6x_elf_le.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc  $(srcdir)/emultempl/tic6xdsbt.em \
-  ${GEN_DEPENDS}
-
-eelf32_tic6x_le.c: $(srcdir)/emulparams/elf32_tic6x_le.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/tic6xdsbt.em \
-  ${GEN_DEPENDS}
-
-eelf32_tic6x_linux_be.c: $(srcdir)/emulparams/elf32_tic6x_linux_be.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc  $(srcdir)/emultempl/tic6xdsbt.em \
-  ${GEN_DEPENDS}
-
-eelf32_tic6x_linux_le.c: $(srcdir)/emulparams/elf32_tic6x_linux_le.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc  $(srcdir)/emultempl/tic6xdsbt.em \
-  ${GEN_DEPENDS}
-
-eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
-  $(srcdir)/emulparams/elf32am33lin.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
-  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32bfin.c: $(srcdir)/emulparams/elf32bfin.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh \
-  $(srcdir)/emulparams/elf32bfin.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
-  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) $(srcdir)/emultempl/irix.em \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
-  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32btsmip_fbsd.c: $(srcdir)/emulparams/elf32btsmip_fbsd.sh \
-  ${srcdir}/emulparams/elf32btsmip.sh ${srcdir}/emulparams/elf_fbsd.sh \
-  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32btsmipn32_fbsd.c: $(srcdir)/emulparams/elf32btsmipn32_fbsd.sh \
-  ${srcdir}/emulparams/elf32ltsmipn32.sh ${srcdir}/emulparams/elf_fbsd.sh \
-  ${srcdir}/emulparams/elf32btsmipn32.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32cr16.c: $(srcdir)/emulparams/elf32cr16.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/cr16elf.em \
-  $(srcdir)/scripttempl/elf32cr16.sc ${GEN_DEPENDS}
-
-eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
-
-eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
-  $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
-
-eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
-  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ebmipvxworks.c: $(srcdir)/emulparams/elf32ebmipvxworks.sh \
-  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
-  $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
-  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
-  $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
-  $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32lr5900.c: $(srcdir)/emulparams/elf32lr5900.sh \
-  $(srcdir)/emulparams/elf32bmip.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32lr5900n32.c: $(srcdir)/emulparams/elf32lr5900n32.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32epiphany.c: $(srcdir)/emulparams/elf32epiphany.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32epiphany_4x4.c: $(srcdir)/emulparams/elf32epiphany_4x4.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/epiphany_4x4.sc ${GEN_DEPENDS}
-
-eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
-  $(srcdir)/emulparams/elf32frv.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ft32.c: $(srcdir)/emulparams/elf32ft32.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/ft32.sc ${GEN_DEPENDS}
-
-eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
-
-eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
-
-eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
-  $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32lm32.c: $(srcdir)/emulparams/elf32lm32.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32lm32fd.c: $(srcdir)/emulparams/elf32lm32fd.sh \
-  $(srcdir)/emulparams/elf32lm32.sh $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
-  $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
-  $(srcdir)/emulparams/elf32ppccommon.sh \
-  $(srcdir)/emulparams/elf32ppc.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32lppclinux.c: $(srcdir)/emulparams/elf32lppclinux.sh \
-  $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
-  $(srcdir)/emulparams/elf32ppccommon.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
-  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
-  $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
-  $(srcdir)/emulparams/elf32ppccommon.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32lriscv.c: $(srcdir)/emulparams/elf32lriscv.sh \
-  $(srcdir)/emulparams/elf32lriscv-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/riscvelf.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32lriscv_ilp32f.c: $(srcdir)/emulparams/elf32lriscv_ilp32f.sh \
-  $(srcdir)/emulparams/elf32lriscv-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/riscvelf.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32lriscv_ilp32.c: $(srcdir)/emulparams/elf32lriscv_ilp32.sh \
-  $(srcdir)/emulparams/elf32lriscv-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/riscvelf.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
-  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
-  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32ltsmip_fbsd.c: $(srcdir)/emulparams/elf32ltsmip_fbsd.sh \
-  ${srcdir}/emulparams/elf32ltsmip.sh ${srcdir}/emulparams/elf_fbsd.sh \
-  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
-  $(srcdir)/emulparams/elf32btsmipn32.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ltsmipn32_fbsd.c: $(srcdir)/emulparams/elf32ltsmipn32_fbsd.sh \
-  ${srcdir}/emulparams/elf32ltsmipn32.sh ${srcdir}/emulparams/elf_fbsd.sh \
-  $(srcdir)/emulparams/elf32btsmipn32.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32mbel_linux.c: $(srcdir)/emulparams/elf32mbel_linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32mb_linux.c: $(srcdir)/emulparams/elf32mb_linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32mep.c: $(srcdir)/emulparams/elf32mep.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/mep.sc ${GEN_DEPENDS}
-
-eelf32metag.c: $(srcdir)/emulparams/elf32metag.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/metagelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32microblazeel.c: $(srcdir)/emulparams/elf32microblazeel.sh \
-  $(srcdir)/emulparams/elf32microblaze.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elfmicroblaze.sc ${GEN_DEPENDS}
-
-eelf32microblaze.c: $(srcdir)/emulparams/elf32microblaze.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elfmicroblaze.sc ${GEN_DEPENDS}
-
-eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-emoxiebox.c: $(srcdir)/emulparams/moxiebox.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32or1k.c: $(srcdir)/emulparams/elf32or1k.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32or1k_linux.c: $(srcdir)/emulparams/elf32or1k_linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
-  $(srcdir)/emulparams/elf32ppccommon.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
-  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
-  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
-  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
-  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ppcvxworks.c: $(srcdir)/emulparams/elf32ppcvxworks.sh \
-  $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emulparams/vxworks.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc32elf.em ldemul-list.h \
-  $(srcdir)/emultempl/vxworks.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32rl78.c: $(srcdir)/emulparams/elf32rl78.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32rx.c: $(srcdir)/emulparams/elf32rx.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32tilegx.c: $(srcdir)/emulparams/elf32tilegx.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32tilegx_be.c: $(srcdir)/emulparams/elf32tilegx_be.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32tilepro.c: $(srcdir)/emulparams/elf32tilepro.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32visium.c: $(srcdir)/emulparams/elf32visium.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/visium.sc ${GEN_DEPENDS}
-
-eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf32xc16x.sc ${GEN_DEPENDS}
-
-eelf32xc16xl.c: $(srcdir)/emulparams/elf32xc16xl.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf32xc16xl.sc ${GEN_DEPENDS}
-
-eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf32xc16xs.sc ${GEN_DEPENDS}
-
-eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/xstormy16.sc ${GEN_DEPENDS}
-
-eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/xtensaelf.em $(INCDIR)/xtensa-config.h \
-  $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/xtensa.h \
-  $(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
-
-eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
-  $(srcdir)/emulparams/elf_i386.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_i386_nacl.c: $(srcdir)/emulparams/elf_i386_nacl.sh \
-  $(srcdir)/emulparams/elf_i386.sh \
-  $(srcdir)/emulparams/elf_nacl.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_i386_sol2.c: $(srcdir)/emulparams/elf_i386_sol2.sh \
-  $(srcdir)/emulparams/solaris2.sh \
-  $(srcdir)/emultempl/solaris2.em \
-  $(srcdir)/emultempl/solaris2-x86.em \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
-  $(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_iamcu.c: $(srcdir)/emulparams/elf_iamcu.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300elf_linux.c: $(srcdir)/emulparams/h8300elf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
-  $(srcdir)/emulparams/h8300elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300helf_linux.c: $(srcdir)/emulparams/h8300helf_linux.sh \
-  $(srcdir)/emulparams/h8300elf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
-  $(srcdir)/emulparams/h8300elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
-  $(srcdir)/emulparams/h8300elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300self_linux.c: $(srcdir)/emulparams/h8300self_linux.sh \
-  $(srcdir)/emulparams/h8300elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
-  $(srcdir)/emulparams/h8300elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
-  $(srcdir)/emulparams/h8300elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300sxelf_linux.c: $(srcdir)/emulparams/h8300sxelf_linux.sh \
-  $(srcdir)/emulparams/h8300elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eh8300sxnelf.c: $(srcdir)/emulparams/h8300sxnelf.sh \
-  $(srcdir)/emulparams/h8300elf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
-  $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
-
-ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
-  $(srcdir)/emulparams/hppaelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
-  $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc \
-  $(srcdir)/scripttempl/DWARF.sc ${GEN_DEPENDS}
-
-ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
-
-ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc \
-  $(srcdir)/scripttempl/DWARF.sc ${GEN_DEPENDS}
-
-ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
-
-ei386nto.c:	$(srcdir)/emulparams/i386nto.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
-  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
-
-ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
-  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
-
-ei386pep.c: $(srcdir)/emulparams/i386pep.sh \
-  $(srcdir)/emultempl/pep.em $(srcdir)/scripttempl/pep.sc ${GEN_DEPENDS}
-
-em32relf.c: $(srcdir)/emulparams/m32relf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
-  $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
-
-em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
-  $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
-
-em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
-  $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
-
-em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
-  $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
-
-em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
-  $(srcdir)/emulparams/m68kelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-em9s12zelf.c: $(srcdir)/emulparams/m9s12zelf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/generic.em \
-  $(srcdir)/scripttempl/elfm9s12z.sc ${GEN_DEPENDS}
-
-emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
-  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/mcorepe.sc ${GEN_DEPENDS}
-
-emn10200.c: $(srcdir)/emulparams/mn10200.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-emn10300.c: $(srcdir)/emulparams/mn10300.sh \
-  $(srcdir)/emulparams/mn10200.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-emsp430elf.c: $(srcdir)/emulparams/msp430elf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/msp430.em \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc ${GEN_DEPENDS}
-
-emsp430X.c: $(srcdir)/emulparams/msp430elf.sh $(srcdir)/emulparams/msp430X.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/msp430.em \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc ${GEN_DEPENDS}
-
-ends32elf.c: $(srcdir)/emulparams/nds32elf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
-  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
-
-ends32elf16m.c: $(srcdir)/emulparams/nds32elf16m.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
-  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
-
-ends32belf.c: $(srcdir)/emulparams/nds32belf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
-  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
-
-ends32belf16m.c: $(srcdir)/emulparams/nds32belf16m.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
-  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
-
-ends32elf_linux.c: $(srcdir)/emulparams/nds32elf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
-  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
-
-ends32belf_linux.c: $(srcdir)/emulparams/nds32belf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \
-  $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS}
-
-enios2elf.c: $(srcdir)/emulparams/nios2elf.sh \
-  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/nios2elf.em \
-  $(srcdir)/scripttempl/elf.sc $(srcdir)/scripttempl/DWARF.sc ${GEN_DEPENDS}
-
-enios2linux.c: $(srcdir)/emulparams/nios2linux.sh \
-  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/nios2elf.em \
-  $(srcdir)/scripttempl/elf.sc $(srcdir)/scripttempl/DWARF.sc ${GEN_DEPENDS}
-
-ens32knbsd.c:	$(srcdir)/emulparams/ns32knbsd.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/netbsd.em \
-  $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
-
-eaarch64elf.c: $(srcdir)/emulparams/aarch64elf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64elf32.c: $(srcdir)/emulparams/aarch64elf32.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64elfb.c: $(srcdir)/emulparams/aarch64elfb.sh $(srcdir)/emulparams/aarch64elf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aarch64elf32.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64cloudabi.c: $(srcdir)/emulparams/aarch64cloudabi.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64cloudabib.c: $(srcdir)/emulparams/aarch64cloudabib.sh $(srcdir)/emulparams/aarch64cloudabi.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64fbsd.c: $(srcdir)/emulparams/aarch64fbsd.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64fbsdb.c: $(srcdir)/emulparams/aarch64fbsdb.sh $(srcdir)/emulparams/aarch64fbsd.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64linux.c: $(srcdir)/emulparams/aarch64linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64linuxb.c: $(srcdir)/emulparams/aarch64linuxb.sh $(srcdir)/emulparams/aarch64linux.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64linux32.c: $(srcdir)/emulparams/aarch64linux32.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eaarch64linux32b.c: $(srcdir)/emulparams/aarch64linux32b.sh $(srcdir)/emulparams/aarch64linux32.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
-
-epdp11.c: $(srcdir)/emulparams/pdp11.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
-
-epjelf.c: $(srcdir)/emulparams/pjelf.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-epjlelf.c: $(srcdir)/emulparams/pjlelf.sh $(srcdir)/emulparams/pjelf.sh \
-  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eppcmacos.c:	$(srcdir)/emulparams/ppcmacos.sh \
-  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
-
-eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
-  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
-
-epruelf.c: $(srcdir)/emulparams/pruelf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/pru.sc \
-  $(srcdir)/emultempl/pruelf.em ${GEN_DEPENDS}
-
-escore3_elf.c: $(srcdir)/emulparams/score3_elf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-escore7_elf.c: $(srcdir)/emulparams/score3_elf.sh \
-  $(srcdir)/emulparams/score7_elf.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-esh.c: $(srcdir)/emulparams/sh.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
-
-eshelf.c: $(srcdir)/emulparams/shelf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf_fd.c: $(srcdir)/emulparams/shelf_fd.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
-  $(srcdir)/emulparams/shlelf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
-  $(srcdir)/emulparams/shelf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshelf_vxworks.c: $(srcdir)/emulparams/shelf_vxworks.sh \
-  $(srcdir)/emulparams/vxworks.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc \
-  $(srcdir)/emultempl/vxworks.em ${GEN_DEPENDS}
-
-eshl.c: $(srcdir)/emulparams/shl.sh \
-  $(srcdir)/emulparams/sh.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
-
-eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
-  $(srcdir)/emulparams/shelf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf_fd.c: $(srcdir)/emulparams/shlelf_fd.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
-  $(srcdir)/emulparams/shelf_nbsd.sh \
-  $(srcdir)/emulparams/shelf.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eshlelf_vxworks.c: $(srcdir)/emulparams/shlelf_vxworks.sh \
-  $(srcdir)/emulparams/shelf_vxworks.sh $(srcdir)/emulparams/vxworks.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
-  ${GEN_DEPENDS}
-
-eshpe.c: $(srcdir)/emulparams/shpe.sh \
-  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
-
-etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
-
-etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
-
-etic3xcoff.c: $(srcdir)/emulparams/tic3xcoff.sh \
-  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
-
-etic3xcoff_onchip.c: $(srcdir)/emulparams/tic3xcoff_onchip.sh \
-  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
-
-etic4xcoff.c: $(srcdir)/emulparams/tic4xcoff.sh \
-  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
-
-etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \
-  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS}
-
-etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS}
-
-ev850.c: $(srcdir)/emulparams/v850.sh $(srcdir)/emultempl/v850elf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
-
-ev850_rh850.c: $(srcdir)/emulparams/v850_rh850.sh $(srcdir)/emultempl/v850elf.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/v850_rh850.sc ${GEN_DEPENDS}
-
-evanilla.c: $(srcdir)/emulparams/vanilla.sh \
-  $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
-
-evaxnbsd.c: $(srcdir)/emulparams/vaxnbsd.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
-
-exgateelf.c: $(srcdir)/emulparams/xgateelf.sh \
-  $(srcdir)/emultempl/generic.em $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elfxgate.sc ${GEN_DEPENDS}
-
-ez80.c: $(srcdir)/emulparams/z80.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/z80.em \
-  $(srcdir)/scripttempl/z80.sc ${GEN_DEPENDS}
-
-ez8001.c: $(srcdir)/emulparams/z8001.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
-
-ez8002.c: $(srcdir)/emulparams/z8002.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
-
-eelf32_x86_64.c: $(srcdir)/emulparams/elf32_x86_64.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf32_x86_64_nacl.c: $(srcdir)/emulparams/elf32_x86_64_nacl.sh \
-  $(srcdir)/emulparams/elf32_x86_64.sh \
-  $(srcdir)/emulparams/elf_nacl.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
-  $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
-  $(srcdir)/emulparams/elf64_ia64.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
-  $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64_ia64_vms.c: $(srcdir)/emulparams/elf64_ia64_vms.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/vms.em \
-  $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/ia64vms.sc ${GEN_DEPENDS}
-
-eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
-  $(srcdir)/emultempl/s390.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
-  $(srcdir)/emulparams/elf64_sparc.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64_sparc_sol2.c: $(srcdir)/emulparams/elf64_sparc_sol2.sh \
-  $(srcdir)/emulparams/elf64_sparc.sh \
-  $(srcdir)/emulparams/solaris2.sh \
-  $(srcdir)/emultempl/solaris2.em \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
-  $(srcdir)/emulparams/elf64alpha.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
-  $(srcdir)/emulparams/elf64alpha.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
-  $(srcdir)/emulparams/elf64bmip-defs.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
-  $(srcdir)/emulparams/elf64bmip-defs.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64btsmip_fbsd.c: $(srcdir)/emulparams/elf64btsmip_fbsd.sh \
-  ${srcdir}/emulparams/elf64btsmip.sh ${srcdir}/emulparams/elf_fbsd.sh \
-  $(srcdir)/emulparams/elf64bmip-defs.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf64hppa.sc ${GEN_DEPENDS}
-
-eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
-  $(srcdir)/emulparams/elf64ppc.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64lriscv.c: $(srcdir)/emulparams/elf64lriscv.sh \
-  $(srcdir)/emulparams/elf64lriscv-defs.sh \
-  $(srcdir)/emulparams/elf32lriscv-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/riscvelf.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf64lriscv_lp64f.c: $(srcdir)/emulparams/elf64lriscv_lp64f.sh \
-  $(srcdir)/emulparams/elf64lriscv-defs.sh \
-  $(srcdir)/emulparams/elf32lriscv-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/riscvelf.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf64lriscv_lp64.c: $(srcdir)/emulparams/elf64lriscv_lp64.sh \
-  $(srcdir)/emulparams/elf64lriscv-defs.sh \
-  $(srcdir)/emulparams/elf32lriscv-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/riscvelf.em $(srcdir)/scripttempl/elf.sc \
-  ${GEN_DEPENDS}
-
-eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
-  $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64ltsmip_fbsd.c: $(srcdir)/emulparams/elf64ltsmip_fbsd.sh \
-  ${srcdir}/emulparams/elf64ltsmip.sh ${srcdir}/emulparams/elf_fbsd.sh \
-  $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
-  $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
-  $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/mmix-elfnmmo.em \
-  $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64ppc_fbsd.c: $(srcdir)/emulparams/elf64ppc_fbsd.sh \
-  $(srcdir)/emulparams/dynamic_undefined_weak.sh \
-  $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64rdos.c: $(srcdir)/emulparams/elf64rdos.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64tilegx.c: $(srcdir)/emulparams/elf64tilegx.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf64tilegx_be.c: $(srcdir)/emulparams/elf64tilegx_be.sh \
-  $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_l1om.c: $(srcdir)/emulparams/elf_l1om.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_l1om_fbsd.c: $(srcdir)/emulparams/elf_l1om_fbsd.sh \
-  $(srcdir)/emulparams/elf_l1om.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_k1om.c: $(srcdir)/emulparams/elf_k1om.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_k1om_fbsd.c: $(srcdir)/emulparams/elf_k1om_fbsd.sh \
-  $(srcdir)/emulparams/elf_k1om.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_x86_64_cloudabi.c: $(srcdir)/emulparams/elf_x86_64_cloudabi.sh \
-  $(srcdir)/emulparams/elf_x86_64.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
-  $(srcdir)/emulparams/elf_x86_64.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_x86_64_nacl.c: $(srcdir)/emulparams/elf_x86_64_nacl.sh \
-  $(srcdir)/emulparams/elf_x86_64.sh \
-  $(srcdir)/emulparams/elf_nacl.sh \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-eelf_x86_64_sol2.c: $(srcdir)/emulparams/elf_x86_64_sol2.sh \
-  $(srcdir)/emulparams/elf_x86_64.sh \
-  $(srcdir)/emulparams/solaris2.sh \
-  $(srcdir)/emultempl/solaris2.em \
-  $(srcdir)/emultempl/solaris2-x86.em \
-  $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
-  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-
-emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
-  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em \
-  $(srcdir)/emultempl/mmo.em $(srcdir)/scripttempl/DWARF.sc \
-  $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
-
+# It's a pity we can't generate these include "./deps/e*.Pc" lines
+# from ALL_EMULATION_SOURCES and ALL_64_EMULATION_SOURCES, but that isn't
+# so easy to do.  What we'd like to do is have automake generate these
+# lines in Makefile.in, but I can't see a way of doing that.  Generating
+# the includes at configure time is possible but then we'd need to
+# duplicate autoconf/automake handling of dependency files.
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5ppc.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5rs6.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaixppc.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaixrs6.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ealpha.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ealphavms.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earcv2elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earcv2elfx.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earcelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earcelf_prof.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earclinux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earclinux_nps.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earclinux_prof.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earm_wince_pe.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fuchsia.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_fdpiceabi.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nacl.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_phoenix.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_fuchsia.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_eabi.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_fdpiceabi.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nacl.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnto.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmpe.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmsymbian.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr1.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr2.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr25.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr3.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr31.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr35.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr4.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr5.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr51.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr6.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega1.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega2.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega3.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega4.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega5.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega6.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega7.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrtiny.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecrisaout.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecriself.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecrislinux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecskyelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecskyelf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ed10velf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ed30v_e.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ed30v_o.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ed30velf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_dlx.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_sparc.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_sparc_sol2.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_sparc_vxworks.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_spu.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_tic6x_be.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_tic6x_le.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_tic6x_linux_be.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_tic6x_linux_le.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_tic6x_elf_be.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_tic6x_elf_le.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32am33lin.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bfin.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bfinfd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32cr16.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32cr16c.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32crx.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32epiphany.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32epiphany_4x4.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32fr30.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32frv.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32frvfd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ft32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ip2k.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32iq10.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32iq2000.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lm32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lm32fd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppc.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppclinux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcnto.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcsim.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32m32c.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mb_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mbel_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mcore.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mep.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32metag.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32microblazeel.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32microblaze.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32moxie.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emoxiebox.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mt.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppclinux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcnto.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcsim.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcvxworks.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcwindiss.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lriscv.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lriscv_ilp32f.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lriscv_ilp32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32rl78.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32rx.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32tilegx.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32tilegx_be.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32tilepro.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32vax.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32visium.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xc16x.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xc16xl.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xc16xs.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xstormy16.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xtensa.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_ldso.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_nacl.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_sol2.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_vxworks.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_iamcu.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_s390.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300elf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300helf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300helf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300hnelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300self.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300self_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300snelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300sxelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300sxelf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300sxnelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehppaelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehppalinux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehppanbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehppaobsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386beos.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386bsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386go32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386lynx.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386moss.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386msdos.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386nto.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386pe.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386pe_posix.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em32relf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em32relf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em32rlelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em32rlelf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68hc11elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68hc11elfb.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68hc12elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68hc12elfb.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em68kelfnbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/em9s12zelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emcorepe.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emn10200.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emn10300.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emsp430elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emsp430X.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32elf16m.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32elf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32belf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32belf16m.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32belf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ens32knbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enios2elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enios2linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epc532macha.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epdp11.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epjelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epjlelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eppclynx.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eppcmacos.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eppcpe.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epruelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escore3_elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escore7_elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esh.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_fd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_nbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_nto.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_uclinux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshelf_vxworks.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshl.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf_fd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf_linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf_nbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf_nto.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshlelf_vxworks.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eshpe.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etic30aout.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etic30coff.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etic3xcoff.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etic3xcoff_onchip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etic4xcoff.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etic54xcoff.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etic80coff.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ev850.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ev850_rh850.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evanilla.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evaxnbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exgateelf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ez80.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ez8001.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ez8002.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64elf.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64elf32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64elfb.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64elf32b.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64cloudabi.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64cloudabib.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsdb.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_x86_64.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_x86_64_nacl.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32b4300.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bmipn32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bsmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32btsmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32btsmip_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32btsmipn32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32btsmipn32_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ebmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ebmipvxworks.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32elmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32elmipvxworks.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32l4300.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lr5900.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lr5900n32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lsmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmip_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmipn32.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmipn32_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mipswindiss.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64_aix.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64_ia64.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64_ia64_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64_ia64_vms.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64_s390.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64_sparc.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64_sparc_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64_sparc_sol2.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64alpha.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64alpha_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64alpha_nbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64bmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ltsmip.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ltsmip_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64mmix.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64rdos.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_l1om.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_l1om_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_cloudabi.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_nacl.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_sol2.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehppa64linux.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386pep.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emmo.Pc@am__quote@
 
 # We need this for automake to use YLWRAP.
 EXTRA_ld_new_SOURCES = deffilep.y ldlex.l
diff --git a/ld/configure.ac b/ld/configure.ac
index ec434066af..ee62d10ac5 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -384,7 +384,11 @@  tdir_$i=$result"
 	    ;;
 	  esac
 	  if test "$elf_list_options" = "TRUE"; then
-	    . ${srcdir}/emulparams/${i}.sh
+	    source_sh()
+	    {
+	      . $1
+	    }
+	    source_sh ${srcdir}/emulparams/${i}.sh
 	    if test x${GENERATE_SHLIB_SCRIPT} = xyes; then
 	      elf_shlib_list_options=TRUE
 	    fi
diff --git a/ld/emulparams/aarch64cloudabib.sh b/ld/emulparams/aarch64cloudabib.sh
index 909d0f3757..a7d1b62eb2 100644
--- a/ld/emulparams/aarch64cloudabib.sh
+++ b/ld/emulparams/aarch64cloudabib.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/aarch64cloudabi.sh
+source_sh ${srcdir}/emulparams/aarch64cloudabi.sh
 OUTPUT_FORMAT="elf64-bigaarch64-cloudabi"
diff --git a/ld/emulparams/aarch64elf32b.sh b/ld/emulparams/aarch64elf32b.sh
index aa0a2c54b5..bb0a8e8591 100644
--- a/ld/emulparams/aarch64elf32b.sh
+++ b/ld/emulparams/aarch64elf32b.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/aarch64elf32.sh
+source_sh ${srcdir}/emulparams/aarch64elf32.sh
 OUTPUT_FORMAT="elf32-bigaarch64"
diff --git a/ld/emulparams/aarch64elfb.sh b/ld/emulparams/aarch64elfb.sh
index 7a3ff979a3..afda802d43 100644
--- a/ld/emulparams/aarch64elfb.sh
+++ b/ld/emulparams/aarch64elfb.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/aarch64elf.sh
+source_sh ${srcdir}/emulparams/aarch64elf.sh
 OUTPUT_FORMAT="elf64-bigaarch64"
diff --git a/ld/emulparams/aarch64fbsdb.sh b/ld/emulparams/aarch64fbsdb.sh
index 2c55dde8d8..cabe9d35ce 100644
--- a/ld/emulparams/aarch64fbsdb.sh
+++ b/ld/emulparams/aarch64fbsdb.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/aarch64fbsd.sh
+source_sh ${srcdir}/emulparams/aarch64fbsd.sh
 OUTPUT_FORMAT="elf64-bigaarch64"
diff --git a/ld/emulparams/aarch64linux32b.sh b/ld/emulparams/aarch64linux32b.sh
index e92feecb3c..c85d530161 100644
--- a/ld/emulparams/aarch64linux32b.sh
+++ b/ld/emulparams/aarch64linux32b.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/aarch64linux32.sh
+source_sh ${srcdir}/emulparams/aarch64linux32.sh
 OUTPUT_FORMAT="elf32-bigaarch64"
 ELF_INTERPRETER_NAME=\"/lib/ld-linux-aarch64_be_ilp32.so.1\"
diff --git a/ld/emulparams/aarch64linuxb.sh b/ld/emulparams/aarch64linuxb.sh
index 75232050f8..d3524c74ba 100644
--- a/ld/emulparams/aarch64linuxb.sh
+++ b/ld/emulparams/aarch64linuxb.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/aarch64linux.sh
+source_sh ${srcdir}/emulparams/aarch64linux.sh
 OUTPUT_FORMAT="elf64-bigaarch64"
 ELF_INTERPRETER_NAME=\"/lib/ld-linux-aarch64_be.so.1\"
diff --git a/ld/emulparams/arcelf.sh b/ld/emulparams/arcelf.sh
index 21c5c82d4c..875df7e0b3 100644
--- a/ld/emulparams/arcelf.sh
+++ b/ld/emulparams/arcelf.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
 SCRIPT_NAME=elfarc
 TEMPLATE_NAME=elf32
 if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/arcelf_prof.sh b/ld/emulparams/arcelf_prof.sh
index c94e3cb204..74e9604eca 100644
--- a/ld/emulparams/arcelf_prof.sh
+++ b/ld/emulparams/arcelf_prof.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
 SCRIPT_NAME=elfarc
 TEMPLATE_NAME=elf32
 if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/arclinux.sh b/ld/emulparams/arclinux.sh
index 63e56ec30f..d342819215 100644
--- a/ld/emulparams/arclinux.sh
+++ b/ld/emulparams/arclinux.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
 ARCH=arc
 SCRIPT_NAME=arclinux
 if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/arclinux_nps.sh b/ld/emulparams/arclinux_nps.sh
index b1c6a7dbbf..c5bcac8b8a 100644
--- a/ld/emulparams/arclinux_nps.sh
+++ b/ld/emulparams/arclinux_nps.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/arclinux.sh
+source_sh ${srcdir}/emulparams/arclinux.sh
 # Extend the OTHER_SECTIONS for nps.
-. ${srcdir}/emulparams/arc-nps.sh
+source_sh ${srcdir}/emulparams/arc-nps.sh
diff --git a/ld/emulparams/arclinux_prof.sh b/ld/emulparams/arclinux_prof.sh
index ebcbd9b977..fbbf20d15f 100644
--- a/ld/emulparams/arclinux_prof.sh
+++ b/ld/emulparams/arclinux_prof.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
 SCRIPT_NAME=arclinux
 if [ "x${ARC_ENDIAN}" = "xbig" ]; then
   OUTPUT_FORMAT="elf32-bigarc"
diff --git a/ld/emulparams/arcv2elf.sh b/ld/emulparams/arcv2elf.sh
index feedbe8980..4b0cf553a6 100644
--- a/ld/emulparams/arcv2elf.sh
+++ b/ld/emulparams/arcv2elf.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
 MACHINE=
 SCRIPT_NAME=elfarcv2
 if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/arcv2elfx.sh b/ld/emulparams/arcv2elfx.sh
index 8a56509a02..cfe7ea022a 100644
--- a/ld/emulparams/arcv2elfx.sh
+++ b/ld/emulparams/arcv2elfx.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
 MACHINE=
 SCRIPT_NAME=elfarcv2
 if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/armelf_fbsd.sh b/ld/emulparams/armelf_fbsd.sh
index b2a39216b0..be88c2f2e0 100644
--- a/ld/emulparams/armelf_fbsd.sh
+++ b/ld/emulparams/armelf_fbsd.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/armelf.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 
 TEXT_START_ADDR=0x00010000
 
diff --git a/ld/emulparams/armelf_linux_eabi.sh b/ld/emulparams/armelf_linux_eabi.sh
index 5b0c6b8869..e1b6a114fc 100644
--- a/ld/emulparams/armelf_linux_eabi.sh
+++ b/ld/emulparams/armelf_linux_eabi.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/armelf_linux.sh
+source_sh ${srcdir}/emulparams/armelf_linux.sh
 
 # Use the ARM ABI-compliant exception-handling sections.
 OTHER_READONLY_SECTIONS="
diff --git a/ld/emulparams/armelf_linux_fdpiceabi.sh b/ld/emulparams/armelf_linux_fdpiceabi.sh
index aa604aaadf..97d41f88ef 100644
--- a/ld/emulparams/armelf_linux_fdpiceabi.sh
+++ b/ld/emulparams/armelf_linux_fdpiceabi.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/armelf_linux.sh
+source_sh ${srcdir}/emulparams/armelf_linux.sh
 
 OUTPUT_FORMAT="elf32-littlearm-fdpic"
 BIG_OUTPUT_FORMAT="elf32-bigarm-fdpic"
diff --git a/ld/emulparams/armelf_nacl.sh b/ld/emulparams/armelf_nacl.sh
index 9319577df7..3d5a3b0285 100644
--- a/ld/emulparams/armelf_nacl.sh
+++ b/ld/emulparams/armelf_nacl.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/armelf_linux_eabi.sh
-. ${srcdir}/emulparams/elf_nacl.sh
+source_sh ${srcdir}/emulparams/armelf_linux_eabi.sh
+source_sh ${srcdir}/emulparams/elf_nacl.sh
 BIG_OUTPUT_FORMAT="elf32-bigarm-nacl"
 LITTLE_OUTPUT_FORMAT="elf32-littlearm-nacl"
 OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT"
diff --git a/ld/emulparams/armelf_nbsd.sh b/ld/emulparams/armelf_nbsd.sh
index 517cd62659..37e1a4afdd 100644
--- a/ld/emulparams/armelf_nbsd.sh
+++ b/ld/emulparams/armelf_nbsd.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/armelf.sh
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 TEXT_START_ADDR=0x00008000
 TARGET2_TYPE=got-rel
diff --git a/ld/emulparams/armelf_vxworks.sh b/ld/emulparams/armelf_vxworks.sh
index ca5c907a07..5f57535fee 100644
--- a/ld/emulparams/armelf_vxworks.sh
+++ b/ld/emulparams/armelf_vxworks.sh
@@ -1,6 +1,6 @@ 
-. ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/armelf.sh
 OUTPUT_FORMAT="elf32-littlearm-vxworks"
 BIG_OUTPUT_FORMAT="elf32-bigarm-vxworks"
 LITTLE_OUTPUT_FORMAT="$OUTPUT_FORMAT"
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/armelfb.sh b/ld/emulparams/armelfb.sh
index 2d8f38217a..c6cf060bd5 100644
--- a/ld/emulparams/armelfb.sh
+++ b/ld/emulparams/armelfb.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/armelf.sh
 OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armelfb_fbsd.sh b/ld/emulparams/armelfb_fbsd.sh
index a28b476bcf..bde0a5072a 100644
--- a/ld/emulparams/armelfb_fbsd.sh
+++ b/ld/emulparams/armelfb_fbsd.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/armelf_fbsd.sh
+source_sh ${srcdir}/emulparams/armelf_fbsd.sh
 OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armelfb_fuchsia.sh b/ld/emulparams/armelfb_fuchsia.sh
index 7e6f34a94e..6759a95a29 100644
--- a/ld/emulparams/armelfb_fuchsia.sh
+++ b/ld/emulparams/armelfb_fuchsia.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/armelf_fuchsia.sh
+source_sh ${srcdir}/emulparams/armelf_fuchsia.sh
 OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/armelfb_linux.sh b/ld/emulparams/armelfb_linux.sh
index 9ce9e9abf3..e14ea53cc2 100644
--- a/ld/emulparams/armelfb_linux.sh
+++ b/ld/emulparams/armelfb_linux.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/armelf_linux.sh
+source_sh ${srcdir}/emulparams/armelf_linux.sh
 OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armelfb_linux_eabi.sh b/ld/emulparams/armelfb_linux_eabi.sh
index f71c74168e..50d7195a2e 100644
--- a/ld/emulparams/armelfb_linux_eabi.sh
+++ b/ld/emulparams/armelfb_linux_eabi.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/armelf_linux_eabi.sh
+source_sh ${srcdir}/emulparams/armelf_linux_eabi.sh
 OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armelfb_linux_fdpiceabi.sh b/ld/emulparams/armelfb_linux_fdpiceabi.sh
index 988ea7aece..c0033f2245 100644
--- a/ld/emulparams/armelfb_linux_fdpiceabi.sh
+++ b/ld/emulparams/armelfb_linux_fdpiceabi.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/armelf_linux_fdpiceabi.sh
+source_sh ${srcdir}/emulparams/armelf_linux_fdpiceabi.sh
 OUTPUT_FORMAT="elf32-bigarm-fdpic"
diff --git a/ld/emulparams/armelfb_nacl.sh b/ld/emulparams/armelfb_nacl.sh
index df4089abc2..ae5085d5e6 100644
--- a/ld/emulparams/armelfb_nacl.sh
+++ b/ld/emulparams/armelfb_nacl.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/armelf_nacl.sh
+source_sh ${srcdir}/emulparams/armelf_nacl.sh
 OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/armelfb_nbsd.sh b/ld/emulparams/armelfb_nbsd.sh
index 7ab6ce06a5..082712f15e 100644
--- a/ld/emulparams/armelfb_nbsd.sh
+++ b/ld/emulparams/armelfb_nbsd.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/armelf_nbsd.sh
+source_sh ${srcdir}/emulparams/armelf_nbsd.sh
 OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armsymbian.sh b/ld/emulparams/armsymbian.sh
index f852702f19..1959685f9b 100644
--- a/ld/emulparams/armsymbian.sh
+++ b/ld/emulparams/armsymbian.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/armelf.sh
 SCRIPT_NAME="armbpabi"
 GENERATE_COMBRELOC_SCRIPT=1
 OUTPUT_FORMAT="elf32-littlearm-symbian"
diff --git a/ld/emulparams/cskyelf_linux.sh b/ld/emulparams/cskyelf_linux.sh
index 135ea1f954..84fbbf8ef5 100644
--- a/ld/emulparams/cskyelf_linux.sh
+++ b/ld/emulparams/cskyelf_linux.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/cskyelf.sh
+source_sh ${srcdir}/emulparams/cskyelf.sh
 
 unset EMBEDDED
 unset ENTRY
diff --git a/ld/emulparams/elf32_sparc_sol2.sh b/ld/emulparams/elf32_sparc_sol2.sh
index 46ca284914..07c8430814 100644
--- a/ld/emulparams/elf32_sparc_sol2.sh
+++ b/ld/emulparams/elf32_sparc_sol2.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32_sparc.sh
-. ${srcdir}/emulparams/solaris2.sh
+source_sh ${srcdir}/emulparams/elf32_sparc.sh
+source_sh ${srcdir}/emulparams/solaris2.sh
 EXTRA_EM_FILE=solaris2
 OUTPUT_FORMAT="elf32-sparc-sol2"
diff --git a/ld/emulparams/elf32_sparc_vxworks.sh b/ld/emulparams/elf32_sparc_vxworks.sh
index 12a9b38440..5402e5e002 100644
--- a/ld/emulparams/elf32_sparc_vxworks.sh
+++ b/ld/emulparams/elf32_sparc_vxworks.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32_sparc.sh
+source_sh ${srcdir}/emulparams/elf32_sparc.sh
 OUTPUT_FORMAT="elf32-sparc-vxworks"
 unset DATA_PLT
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/elf32_tic6x_be.sh b/ld/emulparams/elf32_tic6x_be.sh
index 648320f9c6..24d6e65307 100644
--- a/ld/emulparams/elf32_tic6x_be.sh
+++ b/ld/emulparams/elf32_tic6x_be.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
 OUTPUT_FORMAT="elf32-tic6x-be"
diff --git a/ld/emulparams/elf32_tic6x_elf_be.sh b/ld/emulparams/elf32_tic6x_elf_be.sh
index a39393357d..23d1f8cd1b 100644
--- a/ld/emulparams/elf32_tic6x_elf_be.sh
+++ b/ld/emulparams/elf32_tic6x_elf_be.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
 OUTPUT_FORMAT="elf32-tic6x-elf-be"
diff --git a/ld/emulparams/elf32_tic6x_elf_le.sh b/ld/emulparams/elf32_tic6x_elf_le.sh
index 8c86ee456a..22f09d6558 100644
--- a/ld/emulparams/elf32_tic6x_elf_le.sh
+++ b/ld/emulparams/elf32_tic6x_elf_le.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
 OUTPUT_FORMAT="elf32-tic6x-elf-le"
 BIG_OUTPUT_FORMAT="elf32-tic6x-elf-be"
diff --git a/ld/emulparams/elf32_tic6x_linux_be.sh b/ld/emulparams/elf32_tic6x_linux_be.sh
index 313395151b..2173c33b8d 100644
--- a/ld/emulparams/elf32_tic6x_linux_be.sh
+++ b/ld/emulparams/elf32_tic6x_linux_be.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
 OUTPUT_FORMAT="elf32-tic6x-linux-be"
diff --git a/ld/emulparams/elf32_tic6x_linux_le.sh b/ld/emulparams/elf32_tic6x_linux_le.sh
index 06defa0d84..dc354c1953 100644
--- a/ld/emulparams/elf32_tic6x_linux_le.sh
+++ b/ld/emulparams/elf32_tic6x_linux_le.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
 OUTPUT_FORMAT="elf32-tic6x-linux-le"
 BIG_OUTPUT_FORMAT="elf32-tic6x-linux-be"
diff --git a/ld/emulparams/elf32_x86_64.sh b/ld/emulparams/elf32_x86_64.sh
index 6fddf626af..43f2519108 100644
--- a/ld/emulparams/elf32_x86_64.sh
+++ b/ld/emulparams/elf32_x86_64.sh
@@ -1,9 +1,9 @@ 
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/reloc_overflow.sh
-. ${srcdir}/emulparams/call_nop.sh
-. ${srcdir}/emulparams/cet.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/reloc_overflow.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/cet.sh
 SCRIPT_NAME=elf
 ELFSIZE=32
 OUTPUT_FORMAT="elf32-x86-64"
diff --git a/ld/emulparams/elf32_x86_64_nacl.sh b/ld/emulparams/elf32_x86_64_nacl.sh
index ea98b287b2..fd5f3d4cf5 100644
--- a/ld/emulparams/elf32_x86_64_nacl.sh
+++ b/ld/emulparams/elf32_x86_64_nacl.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32_x86_64.sh
-. ${srcdir}/emulparams/elf_nacl.sh
+source_sh ${srcdir}/emulparams/elf32_x86_64.sh
+source_sh ${srcdir}/emulparams/elf_nacl.sh
 OUTPUT_FORMAT="elf32-x86-64-nacl"
 ARCH="i386:x64-32:nacl"	# The :nacl just means one-byte nops for code fill.
diff --git a/ld/emulparams/elf32b4300.sh b/ld/emulparams/elf32b4300.sh
index 52fa2950a7..f35153336a 100644
--- a/ld/emulparams/elf32b4300.sh
+++ b/ld/emulparams/elf32b4300.sh
@@ -2,7 +2,7 @@ 
 # elf32l4300.sh
 
 EMBEDDED=yes
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
 TEXT_START_ADDR=0xa0020000
 unset SHLIB_TEXT_START_ADDR
 EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
diff --git a/ld/emulparams/elf32bfinfd.sh b/ld/emulparams/elf32bfinfd.sh
index 4c96bc95a4..b4114b1417 100644
--- a/ld/emulparams/elf32bfinfd.sh
+++ b/ld/emulparams/elf32bfinfd.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32bfin.sh
+source_sh ${srcdir}/emulparams/elf32bfin.sh
 unset STACK_ADDR
 OUTPUT_FORMAT="elf32-bfinfdpic"
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
diff --git a/ld/emulparams/elf32bmipn32.sh b/ld/emulparams/elf32bmipn32.sh
index 4ad6681055..501aaef47b 100644
--- a/ld/emulparams/elf32bmipn32.sh
+++ b/ld/emulparams/elf32bmipn32.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
 OUTPUT_FORMAT="elf32-nbigmips"
 BIG_OUTPUT_FORMAT="elf32-nbigmips"
 LITTLE_OUTPUT_FORMAT="elf32-nlittlemips"
diff --git a/ld/emulparams/elf32bsmip.sh b/ld/emulparams/elf32bsmip.sh
index dfe0fe06af..483b79c403 100644
--- a/ld/emulparams/elf32bsmip.sh
+++ b/ld/emulparams/elf32bsmip.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
 ENTRY=__start
 EXTRA_EM_FILE=irix
diff --git a/ld/emulparams/elf32btsmip.sh b/ld/emulparams/elf32btsmip.sh
index f04f39c5ca..98749fb73a 100644
--- a/ld/emulparams/elf32btsmip.sh
+++ b/ld/emulparams/elf32btsmip.sh
@@ -1,7 +1,7 @@ 
 # If you change this file, please also look at files which source this one:
 # elf32ltsmip.sh
 
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
 OUTPUT_FORMAT="elf32-tradbigmips"
 BIG_OUTPUT_FORMAT="elf32-tradbigmips"
 LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
diff --git a/ld/emulparams/elf32btsmip_fbsd.sh b/ld/emulparams/elf32btsmip_fbsd.sh
index e2a901168b..13985f7971 100644
--- a/ld/emulparams/elf32btsmip_fbsd.sh
+++ b/ld/emulparams/elf32btsmip_fbsd.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf32btsmip.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32btsmip.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf32-tradbigmips-freebsd"
 BIG_OUTPUT_FORMAT="elf32-tradbigmips-freebsd"
 LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32btsmipn32.sh b/ld/emulparams/elf32btsmipn32.sh
index 5fc325f50f..db91241654 100644
--- a/ld/emulparams/elf32btsmipn32.sh
+++ b/ld/emulparams/elf32btsmipn32.sh
@@ -1,7 +1,7 @@ 
 # If you change this file, please also look at files which source this one:
 # elf32ltsmipn32.sh
 
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
 OUTPUT_FORMAT="elf32-ntradbigmips"
 BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
 LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
diff --git a/ld/emulparams/elf32btsmipn32_fbsd.sh b/ld/emulparams/elf32btsmipn32_fbsd.sh
index 83e2e4411d..aa3c601e86 100644
--- a/ld/emulparams/elf32btsmipn32_fbsd.sh
+++ b/ld/emulparams/elf32btsmipn32_fbsd.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf32ltsmipn32.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32ltsmipn32.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf32-ntradbigmips-freebsd"
 BIG_OUTPUT_FORMAT="elf32-ntradbigmips-freebsd"
 LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32ebmip.sh b/ld/emulparams/elf32ebmip.sh
index 704b43ed57..c6d7080096 100644
--- a/ld/emulparams/elf32ebmip.sh
+++ b/ld/emulparams/elf32ebmip.sh
@@ -1,2 +1,2 @@ 
 EMBEDDED=yes
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
diff --git a/ld/emulparams/elf32ebmipvxworks.sh b/ld/emulparams/elf32ebmipvxworks.sh
index 6d1cc3c96c..5ed40a281b 100644
--- a/ld/emulparams/elf32ebmipvxworks.sh
+++ b/ld/emulparams/elf32ebmipvxworks.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
 
 OUTPUT_FORMAT="elf32-bigmips-vxworks"
 BIG_OUTPUT_FORMAT="elf32-bigmips-vxworks"
@@ -17,4 +17,4 @@  SHLIB_TEXT_START_ADDR=0
 unset TEXT_DYNAMIC
 unset DATA_ADDR
 
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/elf32elmip.sh b/ld/emulparams/elf32elmip.sh
index c94e503d60..b8d66ecf6d 100644
--- a/ld/emulparams/elf32elmip.sh
+++ b/ld/emulparams/elf32elmip.sh
@@ -1,2 +1,2 @@ 
 EMBEDDED=yes
-. ${srcdir}/emulparams/elf32lmip.sh
+source_sh ${srcdir}/emulparams/elf32lmip.sh
diff --git a/ld/emulparams/elf32elmipvxworks.sh b/ld/emulparams/elf32elmipvxworks.sh
index c1239441c4..b29f0509eb 100644
--- a/ld/emulparams/elf32elmipvxworks.sh
+++ b/ld/emulparams/elf32elmipvxworks.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
 
 OUTPUT_FORMAT="elf32-littlemips-vxworks"
 BIG_OUTPUT_FORMAT="elf32-bigmips-vxworks"
@@ -8,4 +8,4 @@  SHLIB_TEXT_START_ADDR=0
 unset TEXT_DYNAMIC
 unset DATA_ADDR
 
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/elf32frvfd.sh b/ld/emulparams/elf32frvfd.sh
index c174669626..c9f1d6273e 100644
--- a/ld/emulparams/elf32frvfd.sh
+++ b/ld/emulparams/elf32frvfd.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32frv.sh
+source_sh ${srcdir}/emulparams/elf32frv.sh
 unset STACK_ADDR
 OUTPUT_FORMAT="elf32-frvfdpic"
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
diff --git a/ld/emulparams/elf32l4300.sh b/ld/emulparams/elf32l4300.sh
index 865792af83..428315e73c 100644
--- a/ld/emulparams/elf32l4300.sh
+++ b/ld/emulparams/elf32l4300.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32b4300.sh
+source_sh ${srcdir}/emulparams/elf32b4300.sh
 OUTPUT_FORMAT="elf32-littlemips"
 BIG_OUTPUT_FORMAT="elf32-bigmips"
 LITTLE_OUTPUT_FORMAT="elf32-littlemips"
diff --git a/ld/emulparams/elf32lm32fd.sh b/ld/emulparams/elf32lm32fd.sh
index 52e0822b62..edbea49b6a 100644
--- a/ld/emulparams/elf32lm32fd.sh
+++ b/ld/emulparams/elf32lm32fd.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32lm32.sh
+source_sh ${srcdir}/emulparams/elf32lm32.sh
 unset STACK_ADDR
 unset DYNAMIC_LINK
 OUTPUT_FORMAT="elf32-lm32fdpic"
diff --git a/ld/emulparams/elf32lmip.sh b/ld/emulparams/elf32lmip.sh
index 14d4ded7f9..9560492d55 100644
--- a/ld/emulparams/elf32lmip.sh
+++ b/ld/emulparams/elf32lmip.sh
@@ -1,7 +1,7 @@ 
 # If you change this file, please also look at files which source this one:
 # elf32elmip.sh elf32lsmip.sh
 
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
 OUTPUT_FORMAT="elf32-littlemips"
 BIG_OUTPUT_FORMAT="elf32-bigmips"
 LITTLE_OUTPUT_FORMAT="elf32-littlemips"
diff --git a/ld/emulparams/elf32lppc.sh b/ld/emulparams/elf32lppc.sh
index 8d4e3a0c07..67a9d53f6c 100644
--- a/ld/emulparams/elf32lppc.sh
+++ b/ld/emulparams/elf32lppc.sh
@@ -1,5 +1,5 @@ 
 # If you change this file, please also look at files which source this one:
 # elf32lppcsim.sh elf32lppclinux.sh
 
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
 OUTPUT_FORMAT="elf32-powerpcle"
diff --git a/ld/emulparams/elf32lppclinux.sh b/ld/emulparams/elf32lppclinux.sh
index 9a56372ef9..96b23eee4c 100644
--- a/ld/emulparams/elf32lppclinux.sh
+++ b/ld/emulparams/elf32lppclinux.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32lppc.sh
+source_sh ${srcdir}/emulparams/elf32lppc.sh
 TEXT_START_ADDR=0x10000000
 unset EXECUTABLE_SYMBOLS
 unset OTHER_END_SYMBOLS
diff --git a/ld/emulparams/elf32lppcnto.sh b/ld/emulparams/elf32lppcnto.sh
index c45260d023..8341217962 100644
--- a/ld/emulparams/elf32lppcnto.sh
+++ b/ld/emulparams/elf32lppcnto.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
 OUTPUT_FORMAT="elf32-powerpcle"
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 TEXT_START_ADDR=0x48040000
diff --git a/ld/emulparams/elf32lppcsim.sh b/ld/emulparams/elf32lppcsim.sh
index e743852943..d2acb10cd5 100644
--- a/ld/emulparams/elf32lppcsim.sh
+++ b/ld/emulparams/elf32lppcsim.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32lppc.sh
+source_sh ${srcdir}/emulparams/elf32lppc.sh
 TEXT_START_ADDR=0x10000000
diff --git a/ld/emulparams/elf32lr5900.sh b/ld/emulparams/elf32lr5900.sh
index e8745ff6b8..a06a666695 100644
--- a/ld/emulparams/elf32lr5900.sh
+++ b/ld/emulparams/elf32lr5900.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
 
 OUTPUT_FORMAT="elf32-littlemips"
 BIG_OUTPUT_FORMAT="elf32-bigmips"
diff --git a/ld/emulparams/elf32lr5900n32.sh b/ld/emulparams/elf32lr5900n32.sh
index 7a3c6d7859..56529d3342 100644
--- a/ld/emulparams/elf32lr5900n32.sh
+++ b/ld/emulparams/elf32lr5900n32.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
 
 OUTPUT_FORMAT="elf32-nlittlemips"
 BIG_OUTPUT_FORMAT="elf32-nbigmips"
diff --git a/ld/emulparams/elf32lriscv.sh b/ld/emulparams/elf32lriscv.sh
index e405da353c..da0d7cf54f 100644
--- a/ld/emulparams/elf32lriscv.sh
+++ b/ld/emulparams/elf32lriscv.sh
@@ -1,6 +1,6 @@ 
 # RV32 code using ILP32D ABI.
 # ABI not in emulation name to avoid breaking backward compatibility.
-. ${srcdir}/emulparams/elf32lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf32lriscv-defs.sh
 OUTPUT_FORMAT="elf32-littleriscv"
 
 # On Linux, first look for 32 bit ILP32D target libraries in /lib/ilp32d as per
diff --git a/ld/emulparams/elf32lriscv_ilp32.sh b/ld/emulparams/elf32lriscv_ilp32.sh
index 6b6affe9a9..4935937ef6 100644
--- a/ld/emulparams/elf32lriscv_ilp32.sh
+++ b/ld/emulparams/elf32lriscv_ilp32.sh
@@ -1,5 +1,5 @@ 
 # RV32 code using ILP32 ABI.
-. ${srcdir}/emulparams/elf32lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf32lriscv-defs.sh
 OUTPUT_FORMAT="elf32-littleriscv"
 
 # On Linux, first look for 32 bit ILP32 target libraries in /lib/ilp32 as per
diff --git a/ld/emulparams/elf32lriscv_ilp32f.sh b/ld/emulparams/elf32lriscv_ilp32f.sh
index 246f9ed4fb..c684bf85ee 100644
--- a/ld/emulparams/elf32lriscv_ilp32f.sh
+++ b/ld/emulparams/elf32lriscv_ilp32f.sh
@@ -1,5 +1,5 @@ 
 # RV32 code using ILP32F ABI.
-. ${srcdir}/emulparams/elf32lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf32lriscv-defs.sh
 OUTPUT_FORMAT="elf32-littleriscv"
 
 # On Linux, first look for 32 bit ILP32F target libraries in /lib/ilp32f as per
diff --git a/ld/emulparams/elf32lsmip.sh b/ld/emulparams/elf32lsmip.sh
index 62e4f98dcf..5b733adb75 100644
--- a/ld/emulparams/elf32lsmip.sh
+++ b/ld/emulparams/elf32lsmip.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32lmip.sh
+source_sh ${srcdir}/emulparams/elf32lmip.sh
 ENTRY=__start
diff --git a/ld/emulparams/elf32ltsmip.sh b/ld/emulparams/elf32ltsmip.sh
index 4a660f093e..7f1e33a19c 100644
--- a/ld/emulparams/elf32ltsmip.sh
+++ b/ld/emulparams/elf32ltsmip.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32btsmip.sh
+source_sh ${srcdir}/emulparams/elf32btsmip.sh
 OUTPUT_FORMAT="elf32-tradlittlemips"
diff --git a/ld/emulparams/elf32ltsmip_fbsd.sh b/ld/emulparams/elf32ltsmip_fbsd.sh
index 98cb9872d2..5243e4e19c 100644
--- a/ld/emulparams/elf32ltsmip_fbsd.sh
+++ b/ld/emulparams/elf32ltsmip_fbsd.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf32ltsmip.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32ltsmip.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf32-tradlittlemips-freebsd"
 BIG_OUTPUT_FORMAT="elf32-tradbigmips-freebsd"
 LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32ltsmipn32.sh b/ld/emulparams/elf32ltsmipn32.sh
index 276477d2cc..36d94b6ed9 100644
--- a/ld/emulparams/elf32ltsmipn32.sh
+++ b/ld/emulparams/elf32ltsmipn32.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32btsmipn32.sh
+source_sh ${srcdir}/emulparams/elf32btsmipn32.sh
 OUTPUT_FORMAT="elf32-ntradlittlemips"
 BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
 LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
diff --git a/ld/emulparams/elf32ltsmipn32_fbsd.sh b/ld/emulparams/elf32ltsmipn32_fbsd.sh
index 1d39f69236..e229960b0d 100644
--- a/ld/emulparams/elf32ltsmipn32_fbsd.sh
+++ b/ld/emulparams/elf32ltsmipn32_fbsd.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf32ltsmipn32.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32ltsmipn32.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf32-ntradlittlemips-freebsd"
 BIG_OUTPUT_FORMAT="elf32-ntradbigmips-freebsd"
 LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32microblazeel.sh b/ld/emulparams/elf32microblazeel.sh
index 14f3b3bf56..4c658f39ac 100644
--- a/ld/emulparams/elf32microblazeel.sh
+++ b/ld/emulparams/elf32microblazeel.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32microblaze.sh
+source_sh ${srcdir}/emulparams/elf32microblaze.sh
 OUTPUT_FORMAT=$LITTLE_OUTPUT_FORMAT
diff --git a/ld/emulparams/elf32or1k_linux.sh b/ld/emulparams/elf32or1k_linux.sh
index 80ef51c58e..1cf2da4c0e 100644
--- a/ld/emulparams/elf32or1k_linux.sh
+++ b/ld/emulparams/elf32or1k_linux.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32or1k.sh
+source_sh ${srcdir}/emulparams/elf32or1k.sh
 unset EMBEDDED
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
diff --git a/ld/emulparams/elf32ppc.sh b/ld/emulparams/elf32ppc.sh
index 477279c706..7385e3f048 100644
--- a/ld/emulparams/elf32ppc.sh
+++ b/ld/emulparams/elf32ppc.sh
@@ -2,8 +2,8 @@ 
 # elf32lppcnto.sh elf32lppc.sh elf32ppclinux.sh elf32ppcnto.sh
 # elf32ppcsim.sh
 
-. ${srcdir}/emulparams/elf32ppccommon.sh
-. ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/elf32ppccommon.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
 # Yes, we want duplicate .got and .plt sections.  The linker chooses the
 # appropriate one magically in ppc_after_open
 DATA_GOT=
diff --git a/ld/emulparams/elf32ppc_fbsd.sh b/ld/emulparams/elf32ppc_fbsd.sh
index 0025b61b59..4dca0ec8d7 100644
--- a/ld/emulparams/elf32ppc_fbsd.sh
+++ b/ld/emulparams/elf32ppc_fbsd.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf32ppc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 
 OUTPUT_FORMAT="elf32-powerpc-freebsd"
 
diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
index 11a4d53723..2872ca6a16 100644
--- a/ld/emulparams/elf32ppccommon.sh
+++ b/ld/emulparams/elf32ppccommon.sh
@@ -1,6 +1,6 @@ 
 # The PLT-agnostic parts of a generic 32-bit ELF PowerPC target.  Included by:
 # elf32ppc.sh elf32ppcvxworks.sh elf64ppc.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
 
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
diff --git a/ld/emulparams/elf32ppclinux.sh b/ld/emulparams/elf32ppclinux.sh
index 262731ab32..d78d611324 100644
--- a/ld/emulparams/elf32ppclinux.sh
+++ b/ld/emulparams/elf32ppclinux.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
 TEXT_START_ADDR=0x10000000
 unset EXECUTABLE_SYMBOLS
 unset OTHER_END_SYMBOLS
diff --git a/ld/emulparams/elf32ppcnto.sh b/ld/emulparams/elf32ppcnto.sh
index d0b3e3dfb6..9e1e557856 100644
--- a/ld/emulparams/elf32ppcnto.sh
+++ b/ld/emulparams/elf32ppcnto.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 TEXT_START_ADDR=0x48040000
 
diff --git a/ld/emulparams/elf32ppcsim.sh b/ld/emulparams/elf32ppcsim.sh
index c3466cfaf1..fdcb3708c9 100644
--- a/ld/emulparams/elf32ppcsim.sh
+++ b/ld/emulparams/elf32ppcsim.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
 TEXT_START_ADDR=0x10000000
diff --git a/ld/emulparams/elf32ppcvxworks.sh b/ld/emulparams/elf32ppcvxworks.sh
index 88c1da0c22..d16333cca9 100644
--- a/ld/emulparams/elf32ppcvxworks.sh
+++ b/ld/emulparams/elf32ppcvxworks.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf32ppccommon.sh
-. ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/elf32ppccommon.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
 EXTRA_EM_FILE=ppc32elf
 OUTPUT_FORMAT="elf32-powerpc-vxworks"
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/elf32ppcwindiss.sh b/ld/emulparams/elf32ppcwindiss.sh
index d4547996e2..84d4a206f6 100644
--- a/ld/emulparams/elf32ppcwindiss.sh
+++ b/ld/emulparams/elf32ppcwindiss.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
 
 EMBEDDED=yes
 
diff --git a/ld/emulparams/elf32tilegx_be.sh b/ld/emulparams/elf32tilegx_be.sh
index e3ea498b4e..44b2720bae 100644
--- a/ld/emulparams/elf32tilegx_be.sh
+++ b/ld/emulparams/elf32tilegx_be.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32tilegx.sh
+source_sh ${srcdir}/emulparams/elf32tilegx.sh
 OUTPUT_FORMAT="elf32-tilegx-be"
diff --git a/ld/emulparams/elf64_ia64_fbsd.sh b/ld/emulparams/elf64_ia64_fbsd.sh
index ab7e78f292..4a0e0a6682 100644
--- a/ld/emulparams/elf64_ia64_fbsd.sh
+++ b/ld/emulparams/elf64_ia64_fbsd.sh
@@ -1,6 +1,6 @@ 
-. ${srcdir}/emulparams/elf64_ia64.sh
+source_sh ${srcdir}/emulparams/elf64_ia64.sh
 TEXT_START_ADDR="0x2000000000000000"
 unset DATA_ADDR
 unset SMALL_DATA_CTOR
 unset SMALL_DATA_DTOR
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
diff --git a/ld/emulparams/elf64_sparc_fbsd.sh b/ld/emulparams/elf64_sparc_fbsd.sh
index 21d13ab498..7d70d0874b 100644
--- a/ld/emulparams/elf64_sparc_fbsd.sh
+++ b/ld/emulparams/elf64_sparc_fbsd.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf64_sparc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64_sparc.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 
 OUTPUT_FORMAT="elf64-sparc-freebsd"
diff --git a/ld/emulparams/elf64_sparc_sol2.sh b/ld/emulparams/elf64_sparc_sol2.sh
index 2fad634eee..b32c5be694 100644
--- a/ld/emulparams/elf64_sparc_sol2.sh
+++ b/ld/emulparams/elf64_sparc_sol2.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf64_sparc.sh
-. ${srcdir}/emulparams/solaris2.sh
+source_sh ${srcdir}/emulparams/elf64_sparc.sh
+source_sh ${srcdir}/emulparams/solaris2.sh
 EXTRA_EM_FILE=solaris2
 OUTPUT_FORMAT="elf64-sparc-sol2"
diff --git a/ld/emulparams/elf64alpha_fbsd.sh b/ld/emulparams/elf64alpha_fbsd.sh
index fd4a0a41eb..35b3a0196d 100644
--- a/ld/emulparams/elf64alpha_fbsd.sh
+++ b/ld/emulparams/elf64alpha_fbsd.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/elf64alpha.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64alpha.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf64-alpha-freebsd"
diff --git a/ld/emulparams/elf64alpha_nbsd.sh b/ld/emulparams/elf64alpha_nbsd.sh
index 8116f48b7c..0d139c65cd 100644
--- a/ld/emulparams/elf64alpha_nbsd.sh
+++ b/ld/emulparams/elf64alpha_nbsd.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf64alpha.sh
+source_sh ${srcdir}/emulparams/elf64alpha.sh
 ENTRY=__start
diff --git a/ld/emulparams/elf64bmip-defs.sh b/ld/emulparams/elf64bmip-defs.sh
index 8a0522f8e1..61d6c00472 100644
--- a/ld/emulparams/elf64bmip-defs.sh
+++ b/ld/emulparams/elf64bmip-defs.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
 INITIAL_READONLY_SECTIONS="
   .MIPS.abiflags      ${RELOCATING-0} : { *(.MIPS.abiflags) }
diff --git a/ld/emulparams/elf64bmip.sh b/ld/emulparams/elf64bmip.sh
index 281f516916..e4e4f3b231 100644
--- a/ld/emulparams/elf64bmip.sh
+++ b/ld/emulparams/elf64bmip.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf64bmip-defs.sh
+source_sh ${srcdir}/emulparams/elf64bmip-defs.sh
 OUTPUT_FORMAT="elf64-bigmips"
 BIG_OUTPUT_FORMAT="elf64-bigmips"
 LITTLE_OUTPUT_FORMAT="elf64-littlemips"
diff --git a/ld/emulparams/elf64btsmip.sh b/ld/emulparams/elf64btsmip.sh
index 202585fbfe..043872046e 100644
--- a/ld/emulparams/elf64btsmip.sh
+++ b/ld/emulparams/elf64btsmip.sh
@@ -1,7 +1,7 @@ 
 # If you change this file, please also look at files which source this one:
 # elf64ltsmip.sh
 
-. ${srcdir}/emulparams/elf64bmip-defs.sh
+source_sh ${srcdir}/emulparams/elf64bmip-defs.sh
 OUTPUT_FORMAT="elf64-tradbigmips"
 BIG_OUTPUT_FORMAT="elf64-tradbigmips"
 LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
diff --git a/ld/emulparams/elf64btsmip_fbsd.sh b/ld/emulparams/elf64btsmip_fbsd.sh
index 32889b4d67..3ad876be26 100644
--- a/ld/emulparams/elf64btsmip_fbsd.sh
+++ b/ld/emulparams/elf64btsmip_fbsd.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf64btsmip.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64btsmip.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf64-tradbigmips-freebsd"
 BIG_OUTPUT_FORMAT="elf64-tradbigmips-freebsd"
 LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf64lppc.sh b/ld/emulparams/elf64lppc.sh
index 1c474935eb..71ef0d3efd 100644
--- a/ld/emulparams/elf64lppc.sh
+++ b/ld/emulparams/elf64lppc.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/elf64ppc.sh
+source_sh ${srcdir}/emulparams/elf64ppc.sh
 OUTPUT_FORMAT="elf64-powerpcle"
 NOP=0x00000060
diff --git a/ld/emulparams/elf64lriscv-defs.sh b/ld/emulparams/elf64lriscv-defs.sh
index 930f333979..84a700a5f5 100644
--- a/ld/emulparams/elf64lriscv-defs.sh
+++ b/ld/emulparams/elf64lriscv-defs.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf32lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf32lriscv-defs.sh
 ELFSIZE=64
diff --git a/ld/emulparams/elf64lriscv.sh b/ld/emulparams/elf64lriscv.sh
index f0a10abec7..e07a064873 100644
--- a/ld/emulparams/elf64lriscv.sh
+++ b/ld/emulparams/elf64lriscv.sh
@@ -1,6 +1,6 @@ 
 # RV64 code using LP64D ABI.
 # ABI not in emulation name to avoid breaking backward compatibility.
-. ${srcdir}/emulparams/elf64lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf64lriscv-defs.sh
 OUTPUT_FORMAT="elf64-littleriscv"
 
 # On Linux, first look for 64 bit LP64D target libraries in /lib64/lp64d as per
diff --git a/ld/emulparams/elf64lriscv_lp64.sh b/ld/emulparams/elf64lriscv_lp64.sh
index 80a8f826d1..b1bb252c1e 100644
--- a/ld/emulparams/elf64lriscv_lp64.sh
+++ b/ld/emulparams/elf64lriscv_lp64.sh
@@ -1,5 +1,5 @@ 
 # RV64 code using LP64 ABI.
-. ${srcdir}/emulparams/elf64lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf64lriscv-defs.sh
 OUTPUT_FORMAT="elf64-littleriscv"
 
 # On Linux, first look for 64 bit LP64 target libraries in /lib64/lp64 as per
diff --git a/ld/emulparams/elf64lriscv_lp64f.sh b/ld/emulparams/elf64lriscv_lp64f.sh
index 8f86421feb..005f191c5b 100644
--- a/ld/emulparams/elf64lriscv_lp64f.sh
+++ b/ld/emulparams/elf64lriscv_lp64f.sh
@@ -1,5 +1,5 @@ 
 # RV64 code using LP64F ABI.
-. ${srcdir}/emulparams/elf64lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf64lriscv-defs.sh
 OUTPUT_FORMAT="elf64-littleriscv"
 
 # On Linux, first look for 64 bit LP64F target libraries in /lib64/lp64f as per
diff --git a/ld/emulparams/elf64ltsmip.sh b/ld/emulparams/elf64ltsmip.sh
index efd6b7d8d6..235ae8a780 100644
--- a/ld/emulparams/elf64ltsmip.sh
+++ b/ld/emulparams/elf64ltsmip.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf64btsmip.sh
+source_sh ${srcdir}/emulparams/elf64btsmip.sh
 OUTPUT_FORMAT="elf64-tradlittlemips"
 BIG_OUTPUT_FORMAT="elf64-tradbigmips"
 LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
diff --git a/ld/emulparams/elf64ltsmip_fbsd.sh b/ld/emulparams/elf64ltsmip_fbsd.sh
index 0cd0616315..908b85e2a9 100644
--- a/ld/emulparams/elf64ltsmip_fbsd.sh
+++ b/ld/emulparams/elf64ltsmip_fbsd.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf64ltsmip.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64ltsmip.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf64-tradlittlemips-freebsd"
 BIG_OUTPUT_FORMAT="elf64-tradbigmips-freebsd"
 LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf64ppc.sh b/ld/emulparams/elf64ppc.sh
index d6b8837bc0..0dd42cf432 100644
--- a/ld/emulparams/elf64ppc.sh
+++ b/ld/emulparams/elf64ppc.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf32ppccommon.sh
-. ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/elf32ppccommon.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
 EXTRA_EM_FILE=ppc64elf
 ELFSIZE=64
 OUTPUT_FORMAT="elf64-powerpc"
diff --git a/ld/emulparams/elf64ppc_fbsd.sh b/ld/emulparams/elf64ppc_fbsd.sh
index e1b09cae83..7a380a3100 100644
--- a/ld/emulparams/elf64ppc_fbsd.sh
+++ b/ld/emulparams/elf64ppc_fbsd.sh
@@ -1,5 +1,5 @@ 
-. ${srcdir}/emulparams/elf64ppc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64ppc.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 
 OUTPUT_FORMAT="elf64-powerpc-freebsd"
 DEFAULT_PLT_STATIC_CHAIN=1
diff --git a/ld/emulparams/elf64rdos.sh b/ld/emulparams/elf64rdos.sh
index 87164d573a..b4f2385951 100644
--- a/ld/emulparams/elf64rdos.sh
+++ b/ld/emulparams/elf64rdos.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
 SCRIPT_NAME=elf
 ELFSIZE=64
 OUTPUT_FORMAT="elf64-x86-64"
diff --git a/ld/emulparams/elf64tilegx_be.sh b/ld/emulparams/elf64tilegx_be.sh
index dd0347d601..601b36eced 100644
--- a/ld/emulparams/elf64tilegx_be.sh
+++ b/ld/emulparams/elf64tilegx_be.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf64tilegx.sh
+source_sh ${srcdir}/emulparams/elf64tilegx.sh
 OUTPUT_FORMAT="elf64-tilegx-be"
diff --git a/ld/emulparams/elf_i386.sh b/ld/emulparams/elf_i386.sh
index 5d3f71f10b..6f4bc4bc1d 100644
--- a/ld/emulparams/elf_i386.sh
+++ b/ld/emulparams/elf_i386.sh
@@ -1,8 +1,8 @@ 
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
-. ${srcdir}/emulparams/cet.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/cet.sh
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
 NO_RELA_RELOCS=yes
diff --git a/ld/emulparams/elf_i386_be.sh b/ld/emulparams/elf_i386_be.sh
index 63d7b6d259..0d8c834b18 100644
--- a/ld/emulparams/elf_i386_be.sh
+++ b/ld/emulparams/elf_i386_be.sh
@@ -1,6 +1,6 @@ 
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
 EXTRA_EM_FILE="elf-x86"
diff --git a/ld/emulparams/elf_i386_fbsd.sh b/ld/emulparams/elf_i386_fbsd.sh
index 23785983ff..d1d6604504 100644
--- a/ld/emulparams/elf_i386_fbsd.sh
+++ b/ld/emulparams/elf_i386_fbsd.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/elf_i386.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_i386.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf32-i386-freebsd"
diff --git a/ld/emulparams/elf_i386_ldso.sh b/ld/emulparams/elf_i386_ldso.sh
index 981c7014a3..6bd85e00bc 100644
--- a/ld/emulparams/elf_i386_ldso.sh
+++ b/ld/emulparams/elf_i386_ldso.sh
@@ -1,7 +1,7 @@ 
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-i386"
 EXTRA_EM_FILE="elf-x86"
diff --git a/ld/emulparams/elf_i386_nacl.sh b/ld/emulparams/elf_i386_nacl.sh
index 294f7f5aba..a8cf385fe2 100644
--- a/ld/emulparams/elf_i386_nacl.sh
+++ b/ld/emulparams/elf_i386_nacl.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf_i386.sh
-. ${srcdir}/emulparams/elf_nacl.sh
+source_sh ${srcdir}/emulparams/elf_i386.sh
+source_sh ${srcdir}/emulparams/elf_nacl.sh
 OUTPUT_FORMAT="elf32-i386-nacl"
 ARCH="i386:nacl"	# The :nacl just means one-byte nops for code fill.
diff --git a/ld/emulparams/elf_i386_sol2.sh b/ld/emulparams/elf_i386_sol2.sh
index c45a586e8e..5e63ca8b3a 100644
--- a/ld/emulparams/elf_i386_sol2.sh
+++ b/ld/emulparams/elf_i386_sol2.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf_i386_ldso.sh
-. ${srcdir}/emulparams/solaris2.sh
+source_sh ${srcdir}/emulparams/elf_i386_ldso.sh
+source_sh ${srcdir}/emulparams/solaris2.sh
 EXTRA_EM_FILE="solaris2-x86"
 OUTPUT_FORMAT="elf32-i386-sol2"
diff --git a/ld/emulparams/elf_i386_vxworks.sh b/ld/emulparams/elf_i386_vxworks.sh
index efc164f689..c4426bceb9 100644
--- a/ld/emulparams/elf_i386_vxworks.sh
+++ b/ld/emulparams/elf_i386_vxworks.sh
@@ -11,7 +11,7 @@  EXTRA_EM_FILE="elf-x86"
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
 NO_SMALL_DATA=yes
-. ${srcdir}/emulparams/vxworks.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
diff --git a/ld/emulparams/elf_iamcu.sh b/ld/emulparams/elf_iamcu.sh
index d30a155293..6882a25dca 100644
--- a/ld/emulparams/elf_iamcu.sh
+++ b/ld/emulparams/elf_iamcu.sh
@@ -1,7 +1,7 @@ 
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-iamcu"
 NO_RELA_RELOCS=yes
diff --git a/ld/emulparams/elf_k1om.sh b/ld/emulparams/elf_k1om.sh
index ec84bd0b9f..6be186e083 100644
--- a/ld/emulparams/elf_k1om.sh
+++ b/ld/emulparams/elf_k1om.sh
@@ -1,7 +1,7 @@ 
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
 SCRIPT_NAME=elf
 ELFSIZE=64
 OUTPUT_FORMAT="elf64-k1om"
diff --git a/ld/emulparams/elf_k1om_fbsd.sh b/ld/emulparams/elf_k1om_fbsd.sh
index 98f8033f7f..1ffe059f4f 100644
--- a/ld/emulparams/elf_k1om_fbsd.sh
+++ b/ld/emulparams/elf_k1om_fbsd.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/elf_k1om.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_k1om.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf64-k1om-freebsd"
diff --git a/ld/emulparams/elf_l1om.sh b/ld/emulparams/elf_l1om.sh
index fade2da88f..cf831c7418 100644
--- a/ld/emulparams/elf_l1om.sh
+++ b/ld/emulparams/elf_l1om.sh
@@ -1,7 +1,7 @@ 
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
 SCRIPT_NAME=elf
 ELFSIZE=64
 OUTPUT_FORMAT="elf64-l1om"
diff --git a/ld/emulparams/elf_l1om_fbsd.sh b/ld/emulparams/elf_l1om_fbsd.sh
index a90f81e9fc..0d52b60722 100644
--- a/ld/emulparams/elf_l1om_fbsd.sh
+++ b/ld/emulparams/elf_l1om_fbsd.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/elf_l1om.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_l1om.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf64-l1om-freebsd"
diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh
index 241911dab3..0034a8b926 100644
--- a/ld/emulparams/elf_x86_64.sh
+++ b/ld/emulparams/elf_x86_64.sh
@@ -1,9 +1,9 @@ 
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/reloc_overflow.sh
-. ${srcdir}/emulparams/call_nop.sh
-. ${srcdir}/emulparams/cet.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/reloc_overflow.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/cet.sh
 SCRIPT_NAME=elf
 ELFSIZE=64
 OUTPUT_FORMAT="elf64-x86-64"
diff --git a/ld/emulparams/elf_x86_64_cloudabi.sh b/ld/emulparams/elf_x86_64_cloudabi.sh
index 4d5f7452b7..1f8732ebba 100644
--- a/ld/emulparams/elf_x86_64_cloudabi.sh
+++ b/ld/emulparams/elf_x86_64_cloudabi.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/elf_x86_64.sh
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
 OUTPUT_FORMAT="elf64-x86-64-cloudabi"
diff --git a/ld/emulparams/elf_x86_64_fbsd.sh b/ld/emulparams/elf_x86_64_fbsd.sh
index 35b6a626cd..7ef974addc 100644
--- a/ld/emulparams/elf_x86_64_fbsd.sh
+++ b/ld/emulparams/elf_x86_64_fbsd.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/elf_x86_64.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
 OUTPUT_FORMAT="elf64-x86-64-freebsd"
diff --git a/ld/emulparams/elf_x86_64_nacl.sh b/ld/emulparams/elf_x86_64_nacl.sh
index a6966bdaf3..3f47e4ca98 100644
--- a/ld/emulparams/elf_x86_64_nacl.sh
+++ b/ld/emulparams/elf_x86_64_nacl.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf_x86_64.sh
-. ${srcdir}/emulparams/elf_nacl.sh
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
+source_sh ${srcdir}/emulparams/elf_nacl.sh
 OUTPUT_FORMAT="elf64-x86-64-nacl"
 ARCH="i386:x86-64:nacl"	# The :nacl just means one-byte nops for code fill.
diff --git a/ld/emulparams/elf_x86_64_sol2.sh b/ld/emulparams/elf_x86_64_sol2.sh
index 3bd975ffc7..2bd709d44a 100644
--- a/ld/emulparams/elf_x86_64_sol2.sh
+++ b/ld/emulparams/elf_x86_64_sol2.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf_x86_64.sh
-. ${srcdir}/emulparams/solaris2.sh
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
+source_sh ${srcdir}/emulparams/solaris2.sh
 EXTRA_EM_FILE="solaris2-x86"
 OUTPUT_FORMAT="elf64-x86-64-sol2"
diff --git a/ld/emulparams/h8300helf.sh b/ld/emulparams/h8300helf.sh
index 1cde35cf12..2401b6bc4e 100644
--- a/ld/emulparams/h8300helf.sh
+++ b/ld/emulparams/h8300helf.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
 ARCH="h8300:h8300h"
 STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/h8300helf_linux.sh b/ld/emulparams/h8300helf_linux.sh
index c66ff940f0..22b3738532 100644
--- a/ld/emulparams/h8300helf_linux.sh
+++ b/ld/emulparams/h8300helf_linux.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/h8300elf_linux.sh
+source_sh ${srcdir}/emulparams/h8300elf_linux.sh
 ARCH="h8300:h8300h"
 STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/h8300hnelf.sh b/ld/emulparams/h8300hnelf.sh
index 4a75ff9f81..7ee5dd390d 100644
--- a/ld/emulparams/h8300hnelf.sh
+++ b/ld/emulparams/h8300hnelf.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
 ARCH="h8300:h8300hn"
diff --git a/ld/emulparams/h8300self.sh b/ld/emulparams/h8300self.sh
index 7539eecf54..554de40d00 100644
--- a/ld/emulparams/h8300self.sh
+++ b/ld/emulparams/h8300self.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
 ARCH="h8300:h8300s"
 STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/h8300self_linux.sh b/ld/emulparams/h8300self_linux.sh
index 76f3ed7987..9ea8ac7fca 100644
--- a/ld/emulparams/h8300self_linux.sh
+++ b/ld/emulparams/h8300self_linux.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/h8300elf_linux.sh
+source_sh ${srcdir}/emulparams/h8300elf_linux.sh
 ARCH="h8300:h8300s"
 STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/h8300snelf.sh b/ld/emulparams/h8300snelf.sh
index ddeec11685..0d72d76834 100644
--- a/ld/emulparams/h8300snelf.sh
+++ b/ld/emulparams/h8300snelf.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
 ARCH="h8300:h8300sn"
diff --git a/ld/emulparams/h8300sxelf.sh b/ld/emulparams/h8300sxelf.sh
index c0b715f0ba..f578843307 100644
--- a/ld/emulparams/h8300sxelf.sh
+++ b/ld/emulparams/h8300sxelf.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
 ARCH="h8300:h8300sx"
 STACK_ADDR=0x2fefc
 TINY_READONLY_SECTION=".tinyrodata :
diff --git a/ld/emulparams/h8300sxelf_linux.sh b/ld/emulparams/h8300sxelf_linux.sh
index b06dc2e3df..d7e9f281a6 100644
--- a/ld/emulparams/h8300sxelf_linux.sh
+++ b/ld/emulparams/h8300sxelf_linux.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/h8300elf_linux.sh
+source_sh ${srcdir}/emulparams/h8300elf_linux.sh
 ARCH="h8300:h8300sx"
 STACK_ADDR=0x2fefc
 TINY_READONLY_SECTION=".tinyrodata :
diff --git a/ld/emulparams/h8300sxnelf.sh b/ld/emulparams/h8300sxnelf.sh
index 98e9d49726..75fd22e770 100644
--- a/ld/emulparams/h8300sxnelf.sh
+++ b/ld/emulparams/h8300sxnelf.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
 ARCH="h8300:h8300sxn"
diff --git a/ld/emulparams/hppanbsd.sh b/ld/emulparams/hppanbsd.sh
index dcc6a932ce..7fe86b60e3 100644
--- a/ld/emulparams/hppanbsd.sh
+++ b/ld/emulparams/hppanbsd.sh
@@ -1,6 +1,6 @@ 
 # If you change this file, please also look at files which source this one:
 # hppaobsd.sh
 
-. ${srcdir}/emulparams/hppalinux.sh
+source_sh ${srcdir}/emulparams/hppalinux.sh
 
 OUTPUT_FORMAT="elf32-hppa-netbsd"
diff --git a/ld/emulparams/hppaobsd.sh b/ld/emulparams/hppaobsd.sh
index 0d3bf94942..d89a9747e0 100644
--- a/ld/emulparams/hppaobsd.sh
+++ b/ld/emulparams/hppaobsd.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/hppanbsd.sh
+source_sh ${srcdir}/emulparams/hppanbsd.sh
 
 OUTPUT_FORMAT="elf32-hppa"
 TEXT_START_ADDR=0x1000
diff --git a/ld/emulparams/m32rlelf.sh b/ld/emulparams/m32rlelf.sh
index 2d4488b57f..214c2086c4 100644
--- a/ld/emulparams/m32rlelf.sh
+++ b/ld/emulparams/m32rlelf.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/m32relf.sh
+source_sh ${srcdir}/emulparams/m32relf.sh
 OUTPUT_FORMAT="elf32-m32rle"
diff --git a/ld/emulparams/m32rlelf_linux.sh b/ld/emulparams/m32rlelf_linux.sh
index 6d16a1ccd3..a7a8ab22da 100644
--- a/ld/emulparams/m32rlelf_linux.sh
+++ b/ld/emulparams/m32rlelf_linux.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/m32relf_linux.sh
+source_sh ${srcdir}/emulparams/m32relf_linux.sh
 OUTPUT_FORMAT="elf32-m32rle-linux"
diff --git a/ld/emulparams/m68kelfnbsd.sh b/ld/emulparams/m68kelfnbsd.sh
index 69e328dd05..5823933e59 100644
--- a/ld/emulparams/m68kelfnbsd.sh
+++ b/ld/emulparams/m68kelfnbsd.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/m68kelf.sh
+source_sh ${srcdir}/emulparams/m68kelf.sh
 TEXT_START_ADDR=0x2000
 TARGET_PAGE_SIZE=0x2000
 MACHINE=
diff --git a/ld/emulparams/mn10300.sh b/ld/emulparams/mn10300.sh
index 121987c29e..ba7a2c4e5f 100644
--- a/ld/emulparams/mn10300.sh
+++ b/ld/emulparams/mn10300.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/mn10200.sh
+source_sh ${srcdir}/emulparams/mn10200.sh
 OUTPUT_FORMAT="elf32-mn10300"
 ARCH=mn10300
 TEMPLATE_NAME=elf32
diff --git a/ld/emulparams/msp430X.sh b/ld/emulparams/msp430X.sh
index 4f5af486c5..e5f68e4d4f 100644
--- a/ld/emulparams/msp430X.sh
+++ b/ld/emulparams/msp430X.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/msp430elf.sh
+source_sh ${srcdir}/emulparams/msp430elf.sh
 
 ARCH=MSP430x43
 ROM_START=0x02000
diff --git a/ld/emulparams/nds32belf.sh b/ld/emulparams/nds32belf.sh
index eee48faf40..3179d5284c 100644
--- a/ld/emulparams/nds32belf.sh
+++ b/ld/emulparams/nds32belf.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/nds32elf.sh
+source_sh ${srcdir}/emulparams/nds32elf.sh
 OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/nds32belf16m.sh b/ld/emulparams/nds32belf16m.sh
index 9839f7b18b..491affb5ae 100644
--- a/ld/emulparams/nds32belf16m.sh
+++ b/ld/emulparams/nds32belf16m.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/nds32elf16m.sh
+source_sh ${srcdir}/emulparams/nds32elf16m.sh
 OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/nds32belf_linux.sh b/ld/emulparams/nds32belf_linux.sh
index bc99e38db4..0cb6ebe5f0 100644
--- a/ld/emulparams/nds32belf_linux.sh
+++ b/ld/emulparams/nds32belf_linux.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/nds32elf_linux.sh
+source_sh ${srcdir}/emulparams/nds32elf_linux.sh
 OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/pjlelf.sh b/ld/emulparams/pjlelf.sh
index 88c2b64604..efff956e37 100644
--- a/ld/emulparams/pjlelf.sh
+++ b/ld/emulparams/pjlelf.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/pjelf.sh
+source_sh ${srcdir}/emulparams/pjelf.sh
 OUTPUT_FORMAT="elf32-pjl"
diff --git a/ld/emulparams/ppclynx.sh b/ld/emulparams/ppclynx.sh
index 7451678eae..a58b5b047f 100644
--- a/ld/emulparams/ppclynx.sh
+++ b/ld/emulparams/ppclynx.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
 
 TEXT_BASE=0x00002000
 DYN_TEXT_BASE=0x00400000
diff --git a/ld/emulparams/score7_elf.sh b/ld/emulparams/score7_elf.sh
index 9b7ce9b136..5b1bf6d7da 100644
--- a/ld/emulparams/score7_elf.sh
+++ b/ld/emulparams/score7_elf.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/score3_elf.sh
+source_sh ${srcdir}/emulparams/score3_elf.sh
 ARCH=score7
diff --git a/ld/emulparams/shelf_fd.sh b/ld/emulparams/shelf_fd.sh
index 7ec25abbc7..aa9726cfa5 100644
--- a/ld/emulparams/shelf_fd.sh
+++ b/ld/emulparams/shelf_fd.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/shlelf_fd.sh
+source_sh ${srcdir}/emulparams/shlelf_fd.sh
 OUTPUT_FORMAT="elf32-shbig-fdpic"
diff --git a/ld/emulparams/shelf_linux.sh b/ld/emulparams/shelf_linux.sh
index b841beff40..c7af30b4f3 100644
--- a/ld/emulparams/shelf_linux.sh
+++ b/ld/emulparams/shelf_linux.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/shlelf_linux.sh
+source_sh ${srcdir}/emulparams/shlelf_linux.sh
 OUTPUT_FORMAT="elf32-shbig-linux"
diff --git a/ld/emulparams/shelf_nbsd.sh b/ld/emulparams/shelf_nbsd.sh
index b27993dc8e..391399660d 100644
--- a/ld/emulparams/shelf_nbsd.sh
+++ b/ld/emulparams/shelf_nbsd.sh
@@ -1,7 +1,7 @@ 
 # If you change this file, please alsolook at files which source this one:
 # shlelf_nbsd.sh
 
-. ${srcdir}/emulparams/shelf.sh
+source_sh ${srcdir}/emulparams/shelf.sh
 
 OUTPUT_FORMAT="elf32-sh-nbsd"
 TEXT_START_ADDR=0x400000
diff --git a/ld/emulparams/shelf_uclinux.sh b/ld/emulparams/shelf_uclinux.sh
index dac390ebfc..a22c35a9a8 100644
--- a/ld/emulparams/shelf_uclinux.sh
+++ b/ld/emulparams/shelf_uclinux.sh
@@ -1,4 +1,4 @@ 
-. ${srcdir}/emulparams/shelf.sh
+source_sh ${srcdir}/emulparams/shelf.sh
 
 # We do not want a .stack section
 unset STACK_ADDR
diff --git a/ld/emulparams/shelf_vxworks.sh b/ld/emulparams/shelf_vxworks.sh
index 4b82e36e6e..4929c0d53d 100644
--- a/ld/emulparams/shelf_vxworks.sh
+++ b/ld/emulparams/shelf_vxworks.sh
@@ -18,4 +18,4 @@  SYMPREFIX=_
 GOT=".got          ${RELOCATING-0} : {
   ${RELOCATING+PROVIDE(__GLOBAL_OFFSET_TABLE_ = .);
   *(.got.plt) }*(.got) }"
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/shl.sh b/ld/emulparams/shl.sh
index 5fbb165c2b..cfba04c69c 100644
--- a/ld/emulparams/shl.sh
+++ b/ld/emulparams/shl.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/sh.sh
+source_sh ${srcdir}/emulparams/sh.sh
 OUTPUT_FORMAT="coff-shl"
diff --git a/ld/emulparams/shlelf.sh b/ld/emulparams/shlelf.sh
index e19678bc71..b03dbe2b9a 100644
--- a/ld/emulparams/shlelf.sh
+++ b/ld/emulparams/shlelf.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/shelf.sh
+source_sh ${srcdir}/emulparams/shelf.sh
 OUTPUT_FORMAT="elf32-shl"
diff --git a/ld/emulparams/shlelf_fd.sh b/ld/emulparams/shlelf_fd.sh
index cf827e5a90..2b51245773 100644
--- a/ld/emulparams/shlelf_fd.sh
+++ b/ld/emulparams/shlelf_fd.sh
@@ -1,7 +1,7 @@ 
 # If you change this file, please also look at files which source this one:
 # shelf_fd.sh
 
-. ${srcdir}/emulparams/shlelf_linux.sh
+source_sh ${srcdir}/emulparams/shlelf_linux.sh
 OUTPUT_FORMAT="elf32-sh-fdpic"
 GOT=".got          ${RELOCATING-0} : {${RELOCATING+ *(.got.funcdesc) *(.got.plt)} *(.got) }"
 OTHER_GOT_RELOC_SECTIONS="
diff --git a/ld/emulparams/shlelf_nbsd.sh b/ld/emulparams/shlelf_nbsd.sh
index d6ca82e36c..060f19e6d5 100644
--- a/ld/emulparams/shlelf_nbsd.sh
+++ b/ld/emulparams/shlelf_nbsd.sh
@@ -1,3 +1,3 @@ 
-. ${srcdir}/emulparams/shelf_nbsd.sh
+source_sh ${srcdir}/emulparams/shelf_nbsd.sh
 
 OUTPUT_FORMAT="elf32-shl-nbsd"
diff --git a/ld/emulparams/shlelf_vxworks.sh b/ld/emulparams/shlelf_vxworks.sh
index 0a055b1bf5..161d04eddd 100644
--- a/ld/emulparams/shlelf_vxworks.sh
+++ b/ld/emulparams/shlelf_vxworks.sh
@@ -1,2 +1,2 @@ 
-. ${srcdir}/emulparams/shelf_vxworks.sh
+source_sh ${srcdir}/emulparams/shelf_vxworks.sh
 OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT"
diff --git a/ld/genscrba.sh b/ld/genscrba.sh
index 030cb7d42e..d10e27a43c 100644
--- a/ld/genscrba.sh
+++ b/ld/genscrba.sh
@@ -3,7 +3,7 @@  source_em()
 {
   local current_script="$em_script"
   em_script=$1
-  . $em_script
+  source_sh $1
   em_script=$current_script
 }
 fragment()
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index 77ddbbc8f8..7ee03d2b1c 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -116,17 +116,28 @@  exec_prefix=$4
 host=$5
 target=$6
 target_alias=$7
-EMULATION_LIBPATH=$8
-NATIVE_LIB_DIRS=$9
-shift 9
-use_sysroot=$1
-ENABLE_INITFINI_ARRAY=$2
-EMULATION_NAME=$3
-TOOL_LIB=$4
+DEPDIR=$8
+shift 8
+LIB_PATH=$1
+EMULATION_LIBPATH=$2
+NATIVE_LIB_DIRS=$3
+use_sysroot=$4
+ENABLE_INITFINI_ARRAY=$5
+shift 5
+EMULATION_NAME=$1
+TOOL_LIB=$2
+
+source_sh()
+{
+  echo $1 >> ${DEPDIR}/e${EMULATION_NAME}.Tc
+  . $1
+}
+
+rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
 
 # Include the emulation-specific parameters:
 CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${EMULATION_NAME}.sh"
-. ${CUSTOMIZER_SCRIPT}
+source_sh ${CUSTOMIZER_SCRIPT}
 
 if test -d ldscripts; then
   true
@@ -311,58 +322,58 @@  LD_FLAG=r
 DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
 DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
 ( echo "/* Script for ld -r: link without relocation */"
-  . ${CUSTOMIZER_SCRIPT}
-  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  source_sh ${CUSTOMIZER_SCRIPT}
+  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xr
 
 LD_FLAG=u
 DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
 CONSTRUCTING=" "
 ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
-  . ${CUSTOMIZER_SCRIPT}
-  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  source_sh ${CUSTOMIZER_SCRIPT}
+  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xu
 
 DATA_ALIGNMENT=${DATA_ALIGNMENT_}
 RELOCATING=" "
 LD_FLAG=
 ( echo "/* Default linker script, for normal executables */"
-  . ${CUSTOMIZER_SCRIPT}
-  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  source_sh ${CUSTOMIZER_SCRIPT}
+  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.x
 
 LD_FLAG=textonly
 ( echo "/* Script for -z separate-code: generate normal executables with separate code segment */"
-  . ${CUSTOMIZER_SCRIPT}
-  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  source_sh ${CUSTOMIZER_SCRIPT}
+  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xe
 
 if test -n "$GENERATE_RELRO_SCRIPT"; then
     LD_FLAG=
     RELRO=" "
     ( echo "/* Script for -z relo: generate normal executables with separate code segment */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xo
     LD_FLAG=textonly
     ( echo "/* Script for -z separate-code -z relo: generate normal executables with separate code segment */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xeo
     unset RELRO
 fi
 LD_FLAG=n
 DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
 ( echo "/* Script for -n: mix text and data on same page */"
-  . ${CUSTOMIZER_SCRIPT}
-  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  source_sh ${CUSTOMIZER_SCRIPT}
+  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xn
 
 LD_FLAG=N
 DATA_ALIGNMENT=${DATA_ALIGNMENT_N}
 ( echo "/* Script for -N: mix text and data on same page; don't align data */"
-  . ${CUSTOMIZER_SCRIPT}
-  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  source_sh ${CUSTOMIZER_SCRIPT}
+  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xbn
 
 if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
@@ -370,30 +381,30 @@  if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
   LD_FLAG=c
   COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
   ( echo "/* Script for -z combreloc: combine and sort reloc sections */"
-    . ${CUSTOMIZER_SCRIPT}
-    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+    source_sh ${CUSTOMIZER_SCRIPT}
+    source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
   ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xc
   rm -f ${COMBRELOC}
   LD_FLAG=ctextonly
   COMBRELOC=ldscripts/${EMULATION_NAME}.xce.tmp
   ( echo "/* Script for -z combreloc -z separate-code: combine and sort reloc sections with separate code segment */"
-    . ${CUSTOMIZER_SCRIPT}
-    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+    source_sh ${CUSTOMIZER_SCRIPT}
+    source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
   ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xce
   rm -f ${COMBRELOC}
   RELRO_NOW=" "
   LD_FLAG=w
   COMBRELOC=ldscripts/${EMULATION_NAME}.xw.tmp
   ( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */"
-    . ${CUSTOMIZER_SCRIPT}
-    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+    source_sh ${CUSTOMIZER_SCRIPT}
+    source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
   ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xw
   rm -f ${COMBRELOC}
   LD_FLAG=wtextonly
   COMBRELOC=ldscripts/${EMULATION_NAME}.xwe.tmp
   ( echo "/* Script for -z combreloc -z now -z relro -z separate-code: combine and sort reloc sections with separate code segment */"
-    . ${CUSTOMIZER_SCRIPT}
-    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+    source_sh ${CUSTOMIZER_SCRIPT}
+    source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
   ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xwe
   rm -f ${COMBRELOC}
   COMBRELOC=
@@ -403,15 +414,15 @@  if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
       RELRO=" "
       COMBRELOC=ldscripts/${EMULATION_NAME}.xco.tmp
       ( echo "/* Script for -z combreloc -z relro: combine and sort reloc sections */"
-	. ${CUSTOMIZER_SCRIPT}
-	. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+	source_sh ${CUSTOMIZER_SCRIPT}
+	source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
       ) | sed -e '/^ *$/d;s/[    ]*$//' > ldscripts/${EMULATION_NAME}.xco
       rm -f ${COMBRELOC}
       LD_FLAG=ctextonly
       COMBRELOC=ldscripts/${EMULATION_NAME}.xceo.tmp
       ( echo "/* Script for -z combreloc -z separate-code -z relro: combine and sort reloc sections */"
-	. ${CUSTOMIZER_SCRIPT}
-	. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+	source_sh ${CUSTOMIZER_SCRIPT}
+	source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
       ) | sed -e '/^ *$/d;s/[    ]*$//' > ldscripts/${EMULATION_NAME}.xceo
       rm -f ${COMBRELOC}
       COMBRELOC=
@@ -423,31 +434,27 @@  if test -n "$GENERATE_SHLIB_SCRIPT"; then
   DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
   CREATE_SHLIB=" "
   LD_FLAG=shared
-  (
-    echo "/* Script for ld --shared: link shared library */"
-    . ${CUSTOMIZER_SCRIPT}
-    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  ( echo "/* Script for ld --shared: link shared library */"
+    source_sh ${CUSTOMIZER_SCRIPT}
+    source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
   ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xs
   LD_FLAG=sharedtextonly
-  (
-    echo "/* Script for ld --shared -z separate-code: link shared library with separate code segment */"
-    . ${CUSTOMIZER_SCRIPT}
-    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  ( echo "/* Script for ld --shared -z separate-code: link shared library with separate code segment */"
+    source_sh ${CUSTOMIZER_SCRIPT}
+    source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
   ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xse
 
   if test -n "$GENERATE_RELRO_SCRIPT"; then
       RELRO=" "
       LD_FLAG=shared
-      (
-	  echo "/* Script for ld --shared -z relro: link shared library */"
-	  . ${CUSTOMIZER_SCRIPT}
-	  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      ( echo "/* Script for ld --shared -z relro: link shared library */"
+	source_sh ${CUSTOMIZER_SCRIPT}
+	source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
       ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xso
       LD_FLAG=sharedtextonly
-      (
-	  echo "/* Script for ld --shared -z relro -z separate-code: link shared library with separate code segment */"
-	  . ${CUSTOMIZER_SCRIPT}
-	  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      ( echo "/* Script for ld --shared -z relro -z separate-code: link shared library with separate code segment */"
+	source_sh ${CUSTOMIZER_SCRIPT}
+	source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
       ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xseo
       unset RELRO
   fi
@@ -456,30 +463,30 @@  if test -n "$GENERATE_SHLIB_SCRIPT"; then
     LD_FLAG=cshared
     COMBRELOC=ldscripts/${EMULATION_NAME}.xsc.tmp
     ( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xsc
     rm -f ${COMBRELOC}
     LD_FLAG=csharedtextonly
     COMBRELOC=ldscripts/${EMULATION_NAME}.xsce.tmp
     ( echo "/* Script for --shared -z combreloc -z separate-code: shared library, combine & sort relocs with separate code segment */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xsce
     rm -f ${COMBRELOC}
     RELRO_NOW=" "
     LD_FLAG=wshared
     COMBRELOC=ldscripts/${EMULATION_NAME}.xsw.tmp
     ( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xsw
     rm -f ${COMBRELOC}
     LD_FLAG=wsharedtextonly
     COMBRELOC=ldscripts/${EMULATION_NAME}.xswe.tmp
     ( echo "/* Script for --shared -z combreloc -z now -z relro -z separate-code: shared library, combine & sort relocs with separate code segment */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xswe
     rm -f ${COMBRELOC}
     unset RELRO_NOW
@@ -489,15 +496,15 @@  if test -n "$GENERATE_SHLIB_SCRIPT"; then
 	RELRO=" "
 	COMBRELOC=ldscripts/${EMULATION_NAME}.xsco.tmp
 	( echo "/* Script for --shared -z combreloc -z relro: shared library, combine & sort relocs with separate code segment */"
-	  . ${CUSTOMIZER_SCRIPT}
-	  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+	  source_sh ${CUSTOMIZER_SCRIPT}
+	  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 	) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xsco
 	rm -f ${COMBRELOC}
 	LD_FLAG=wsharedtextonly
 	COMBRELOC=ldscripts/${EMULATION_NAME}.xsceo.tmp
 	( echo "/* Script for --shared -z combreloc -z relro -z separate-code: shared library, combine & sort relocs with separate code segment */"
-	  . ${CUSTOMIZER_SCRIPT}
-	  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+	  source_sh ${CUSTOMIZER_SCRIPT}
+	  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 	) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xsceo
 	rm -f ${COMBRELOC}
 	unset RELRO
@@ -511,30 +518,26 @@  if test -n "$GENERATE_PIE_SCRIPT"; then
   DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
   CREATE_PIE=" "
   LD_FLAG=pie
-  (
-    echo "/* Script for ld -pie: link position independent executable */"
-    . ${CUSTOMIZER_SCRIPT}
-    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  ( echo "/* Script for ld -pie: link position independent executable */"
+    source_sh ${CUSTOMIZER_SCRIPT}
+    source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
   ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xd
   LD_FLAG=pietextonly
-  (
-    echo "/* Script for ld -pie -z separate-code: link position independent executable with separate code segment */"
-    . ${CUSTOMIZER_SCRIPT}
-    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  ( echo "/* Script for ld -pie -z separate-code: link position independent executable with separate code segment */"
+    source_sh ${CUSTOMIZER_SCRIPT}
+    source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
   ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xde
   if test -n "$GENERATE_RELRO_SCRIPT"; then
       RELRO=" "
       LD_FLAG=pie
-      (
-	  echo "/* Script for ld -pie -z relro: link position independent executable */"
-	  . ${CUSTOMIZER_SCRIPT}
-	  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      ( echo "/* Script for ld -pie -z relro: link position independent executable */"
+	source_sh ${CUSTOMIZER_SCRIPT}
+	source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
       ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xdo
       LD_FLAG=pietextonly
-      (
-	  echo "/* Script for ld -pie -z relro -z separate-code: link position independent executable with separate code segment */"
-	  . ${CUSTOMIZER_SCRIPT}
-	  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      ( echo "/* Script for ld -pie -z relro -z separate-code: link position independent executable with separate code segment */"
+	source_sh ${CUSTOMIZER_SCRIPT}
+	source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
       ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xdeo
       unset RELRO
   fi
@@ -543,30 +546,30 @@  if test -n "$GENERATE_PIE_SCRIPT"; then
     COMBRELOC=ldscripts/${EMULATION_NAME}.xdc.tmp
     LD_FLAG=cpie
     ( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xdc
     rm -f ${COMBRELOC}
     LD_FLAG=cpietextonly
     COMBRELOC=ldscripts/${EMULATION_NAME}.xdce.tmp
     ( echo "/* Script for -pie -z combreloc -z separate-code: position independent executable, combine & sort relocs with separate code segment */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xdce
     rm -f ${COMBRELOC}
     RELRO_NOW=" "
     LD_FLAG=wpie
     COMBRELOC=ldscripts/${EMULATION_NAME}.xdw.tmp
     ( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xdw
     rm -f ${COMBRELOC}
     LD_FLAG=wpietextonly
     COMBRELOC=ldscripts/${EMULATION_NAME}.xdwe.tmp
     ( echo "/* Script for -pie -z combreloc -z now -z relro -z separate-code: position independent executable, combine & sort relocs with separate code segment */"
-      . ${CUSTOMIZER_SCRIPT}
-      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+      source_sh ${CUSTOMIZER_SCRIPT}
+      source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
     ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xdwe
     rm -f ${COMBRELOC}
     unset RELRO_NOW
@@ -576,15 +579,15 @@  if test -n "$GENERATE_PIE_SCRIPT"; then
 	RELRO=" "
 	COMBRELOC=ldscripts/${EMULATION_NAME}.xdco.tmp
 	( echo "/* Script for -pie -z combreloc -z relro: position independent executable, combine & sort relocs with separate code segment */"
-	  . ${CUSTOMIZER_SCRIPT}
-	  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+	  source_sh ${CUSTOMIZER_SCRIPT}
+	  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 	) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xdco
 	rm -f ${COMBRELOC}
 	LD_FLAG=wpietextonly
 	COMBRELOC=ldscripts/${EMULATION_NAME}.xdceo.tmp
 	( echo "/* Script for -pie -z combreloc -z relro -z separate-code: position independent executable, combine & sort relocs with separate code segment */"
-	  . ${CUSTOMIZER_SCRIPT}
-	  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+	  source_sh ${CUSTOMIZER_SCRIPT}
+	  source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
 	) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xdceo
 	rm -f ${COMBRELOC}
 
@@ -598,10 +601,9 @@  fi
 if test -n "$GENERATE_AUTO_IMPORT_SCRIPT"; then
   LD_FLAG=auto_import
   DATA_ALIGNMENT=${DATA_ALIGNMENT_}
-  (
-    echo "/* Script for ld --enable-auto-import: Like the default script except read only data is placed into .data  */"
-    . ${CUSTOMIZER_SCRIPT}
-    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+  ( echo "/* Script for ld --enable-auto-import: Like the default script except read only data is placed into .data  */"
+    source_sh ${CUSTOMIZER_SCRIPT}
+    source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
   ) | sed -e '/^ *$/d;s/[	 ]*$//' > ldscripts/${EMULATION_NAME}.xa
 fi
 
@@ -623,7 +625,7 @@  if has_lineno; then
 else
   source_em()
   {
-    . $1
+    source_sh $1
   }
   fragment()
   {
@@ -636,3 +638,13 @@  fi
 # can use the "fragment" function to append.
 > e${EMULATION_NAME}.c
 source_em ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em
+
+ecdeps=
+for dep in `cat ${DEPDIR}/e${EMULATION_NAME}.Tc`; do
+  case " $ecdeps " in
+    *" $dep "*): ;;
+    *) ecdeps="$ecdeps $dep" ;;
+  esac
+done
+rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
+echo "e${EMULATION_NAME}.c:${ecdeps}" > ${DEPDIR}/e${EMULATION_NAME}.Pc