This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: 2.10.91: genscripts.sh outputs incorrect paths
- To: binutils at sourceware dot cygnus dot com
- Subject: Re: 2.10.91: genscripts.sh outputs incorrect paths
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Tue, 23 Jan 2001 00:59:06 +1100 (EST)
- cc: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
I've applied this patch.
* Makefile.am (GENSCRIPTS): Pass exec_prefix.
* Makefile.in: Regenerate.
* genscripts.sh: Use exec_prefix parameter to specify tool lib.
Check for null tool_dir.
Alan Modra
--
Linuxcare. Support for the Revolution.
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.49
diff -u -p -r1.49 Makefile.am
--- Makefile.am 2000/11/30 19:30:32 1.49
+++ Makefile.am 2001/01/22 10:45:12
@@ -302,7 +302,7 @@ stringify.sed: ${srcdir}/emultempl/$(STR
# These all start with e so 'make clean' can find them.
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${exec_prefix} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
@TDIRS@
Index: ld/genscripts.sh
===================================================================
RCS file: /cvs/src/src/ld/genscripts.sh,v
retrieving revision 1.2
diff -u -p -r1.2 genscripts.sh
--- genscripts.sh 1999/06/18 15:25:45 1.2
+++ genscripts.sh 2001/01/22 10:45:16
@@ -1,23 +1,32 @@
#!/bin/sh
# genscripts.sh - generate the ld-emulation-target specific files
#
-# Usage: genscripts.sh srcdir libdir host target target_alias \
-# default_emulation native_lib_dirs this_emulation tool_dir
+# Usage: genscripts.sh srcdir libdir exec_prefix \
+# host target target_alias default_emulation \
+# native_lib_dirs this_emulation tool_dir
#
# Sample usage:
-# genscripts.sh /djm/ld-devo/devo/ld /usr/local/lib sparc-sun-sunos4.1.3 \
-# sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun4 "" sun3 sparc-sun-sunos4.1.3
+# genscripts.sh /djm/ld-devo/devo/ld /usr/local/lib /usr/local \
+# sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun4 \
+# "" sun3 sparc-sun-sunos4.1.3
# produces sun3.x sun3.xbn sun3.xn sun3.xr sun3.xu em_sun3.c
srcdir=$1
libdir=$2
-host=$3
-target=$4
-target_alias=$5
-EMULATION_LIBPATH=$6
-NATIVE_LIB_DIRS=$7
-EMULATION_NAME=$8
-tool_lib=`echo ${libdir} | sed -e 's|/lib$||'`/${9-$target_alias}/lib
+exec_prefix=$3
+host=$4
+target=$5
+target_alias=$6
+EMULATION_LIBPATH=$7
+NATIVE_LIB_DIRS=$8
+EMULATION_NAME=$9
+shift 9
+# Can't use ${1:-$target_alias} here due to an Ultrix shell bug.
+if [ "x$1" = "x" ] ; then
+ tool_lib=${exec_prefix}/${target_alias}/lib
+else
+ tool_lib=${exec_prefix}/$1/lib
+fi
# Include the emulation-specific parameters:
. ${srcdir}/emulparams/${EMULATION_NAME}.sh