From a9d5f78a61879bbe16757a7bfb7285147321437a Mon Sep 17 00:00:00 2001 From: obrien Date: Fri, 11 Oct 2002 10:07:46 +0000 Subject: Sync with 2.13. Reduce forking by using multiple sed expressions rather than piping thru tr(1). Also prefer case over for+test, as case will handle regex's nicely. Note we can't exactly follow the real 2.13 genscripts.sh as we wind up with multiple "'s in search paths. It is too late tonight to track down why. --- gnu/usr.bin/binutils/ld/genscripts.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gnu') diff --git a/gnu/usr.bin/binutils/ld/genscripts.sh b/gnu/usr.bin/binutils/ld/genscripts.sh index e73097b..125e18e 100755 --- a/gnu/usr.bin/binutils/ld/genscripts.sh +++ b/gnu/usr.bin/binutils/ld/genscripts.sh @@ -43,7 +43,8 @@ fi # The format is the usual list of colon-separated directories. # To force a logically empty LIB_PATH, do LIBPATH=":". -LIB_SEARCH_DIRS=`echo ${libdir} | tr ':' ' ' | sed -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\1);/g'` +LIB_SEARCH_DIRS=`echo ${libdir} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\1);/g'` +#2.13 LIB_SEARCH_DIRS=`echo ${libdir} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'` # Generate 5 or 6 script files from a master script template in # ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6 @@ -155,8 +156,9 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then fi fi -for i in $EMULATION_LIBPATH ; do - test "$i" = "$EMULATION_NAME" && COMPILE_IN=true -done +case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) COMPILE_IN=true;; +esac + # Generate e${EMULATION_NAME}.c. . ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em -- cgit v1.1