This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix PR 5215
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Fri, 26 Oct 2007 16:03:19 +0930
- Subject: Fix PR 5215
Hides sh unfriendly bash syntax in another file.
PR 5215
* genscripts.sh: Move bash script to..
* genscrba.sh: ..here.
Index: ld/genscripts.sh
===================================================================
RCS file: /cvs/src/src/ld/genscripts.sh,v
retrieving revision 1.26
diff -u -p -r1.26 genscripts.sh
--- ld/genscripts.sh 1 Oct 2007 09:54:57 -0000 1.26
+++ ld/genscripts.sh 26 Oct 2007 05:07:26 -0000
@@ -402,19 +402,7 @@ case " $EMULATION_LIBPATH " in
esac
if test -n "${BASH+set}"; then
- source_em()
- {
- local current_script="$em_script"
- em_script=$1
- . $em_script
- em_script=$current_script
- }
- fragment()
- {
- local lineno=$[${BASH_LINENO[0]} + 1]
- echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\""
- cat >> e${EMULATION_NAME}.c
- }
+ . ${srcdir}/genscrba.sh
else
source_em()
{
Index: ld/genscrba.sh
===================================================================
RCS file: ld/genscrba.sh
diff -N ld/genscrba.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ld/genscrba.sh 26 Oct 2007 06:19:06 -0000
@@ -0,0 +1,14 @@
+#!/bin/bash
+source_em()
+{
+ local current_script="$em_script"
+ em_script=$1
+ . $em_script
+ em_script=$current_script
+}
+fragment()
+{
+ local lineno=$[${BASH_LINENO[0]} + 1]
+ echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\""
+ cat >> e${EMULATION_NAME}.c
+}
--
Alan Modra
Australia Development Lab, IBM