From 71cd0da0638e584cc49646ca77e280f0931fab2f Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 11 Oct 2002 10:07:46 +0000 Subject: [PATCH] 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(-) diff --git a/gnu/usr.bin/binutils/ld/genscripts.sh b/gnu/usr.bin/binutils/ld/genscripts.sh index e73097b873f..125e18e9765 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