# 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}
- Copyright 1991, 1992, 1994, 1996, 1999, 2000, 2001, 2002, 2003, 2004,
+ Copyright 1991, 1992, 1994, 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2007 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
# 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)
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)
# 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;
else
# Scripts read from the filesystem.
-cat >>e${EMULATION_NAME}.c <<EOF
+fragment <<EOF
{
*isfile = 1;
fi
fi
-cat >>e${EMULATION_NAME}.c <<EOF
+fragment <<EOF
struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
{