diff options
author | Roland McGrath <roland@gnu.org> | 2007-07-19 19:56:10 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2007-07-19 19:56:10 +0000 |
commit | ef747617d69d47411c37b76f9b39d2236508000b (patch) | |
tree | d44c60ac5d1993bd3ed6d96b041ad92200091818 /ld/emultempl/generic.em | |
parent | 5aab282bce4320875daefa4ffd5a4c58ca4285ea (diff) | |
download | binutils-redhat-ef747617d69d47411c37b76f9b39d2236508000b.tar.gz |
2007-07-19 Roland McGrath <roland@redhat.com>
* genscripts.sh (source_em, fragment): New sh functions.
Truncate e${EMULATION_NAME}.c file before .em script fills it.
Use source_em in place of . for the .em script.
* emultempl/generic.em: Use fragment and source_em functions.
* emultempl/aix.em: Likewise.
* emultempl/alphaelf.em: Likewise.
* emultempl/armcoff.em: Likewise.
* emultempl/armelf.em: Likewise.
* emultempl/avrelf.em: Likewise.
* emultempl/beos.em: Likewise.
* emultempl/cr16elf.em: Likewise.
* emultempl/crxelf.em: Likewise.
* emultempl/elf-generic.em: Likewise.
* emultempl/elf32.em: Likewise.
* emultempl/genelf.em: Likewise.
* emultempl/gld960.em: Likewise.
* emultempl/gld960c.em: Likewise.
* emultempl/hppaelf.em: Likewise.
* emultempl/ia64elf.em: Likewise.
* emultempl/irix.em: Likewise.
* emultempl/linux.em: Likewise.
* emultempl/lnk960.em: Likewise.
* emultempl/m68hc1xelf.em: Likewise.
* emultempl/m68kcoff.em: Likewise.
* emultempl/m68kelf.em: Likewise.
* emultempl/mipsecoff.em: Likewise.
* emultempl/mipself.em: Likewise.
* emultempl/mmix-elfnmmo.em: Likewise.
* emultempl/mmixelf.em: Likewise.
* emultempl/mmo.em: Likewise.
* emultempl/needrelax.em: Likewise.
* emultempl/netbsd.em: Likewise.
* emultempl/pe.em: Likewise.
* emultempl/pep.em: Likewise.
* emultempl/ppc32elf.em: Likewise.
* emultempl/ppc64elf.em: Likewise.
* emultempl/scoreelf.em: Likewise.
* emultempl/sh64elf.em: Likewise.
* emultempl/spuelf.em: Likewise.
* emultempl/sunos.em: Likewise.
* emultempl/ticoff.em: Likewise.
* emultempl/vanilla.em: Likewise.
* emultempl/vxworks.em: Likewise.
* emultempl/xtensaelf.em: Likewise.
* emultempl/z80.em: Likewise.
Diffstat (limited to 'ld/emultempl/generic.em')
-rw-r--r-- | ld/emultempl/generic.em | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ld/emultempl/generic.em b/ld/emultempl/generic.em index 35621c39db..048ebbdafc 100644 --- a/ld/emultempl/generic.em +++ b/ld/emultempl/generic.em @@ -1,6 +1,6 @@ # This shell script emits a C file. -*- C -*- # It does some substitutions. -cat >e${EMULATION_NAME}.c <<EOF +fragment <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} @@ -45,11 +45,11 @@ EOF # Import any needed special functions and/or overrides. # if test -n "$EXTRA_EM_FILE" ; then -. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em + source_em ${srcdir}/emultempl/${EXTRA_EM_FILE}.em fi if test x"$LDEMUL_BEFORE_PARSE" != xgld"$EMULATION_NAME"_before_parse; then -cat >>e${EMULATION_NAME}.c <<EOF +fragment <<EOF static void gld${EMULATION_NAME}_before_parse (void) @@ -63,7 +63,7 @@ EOF fi if test x"$LDEMUL_GET_SCRIPT" != xgld"$EMULATION_NAME"_get_script; then -cat >>e${EMULATION_NAME}.c <<EOF +fragment <<EOF static char * gld${EMULATION_NAME}_get_script (int *isfile) @@ -76,7 +76,7 @@ then # sed commands to quote an ld script as a C string. sc="-f stringify.sed" -cat >>e${EMULATION_NAME}.c <<EOF +fragment <<EOF { *isfile = 0; @@ -97,7 +97,7 @@ echo '; }' >> e${EMULATION_NAME}.c else # Scripts read from the filesystem. -cat >>e${EMULATION_NAME}.c <<EOF +fragment <<EOF { *isfile = 1; @@ -116,7 +116,7 @@ EOF fi fi -cat >>e${EMULATION_NAME}.c <<EOF +fragment <<EOF struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = { |