diff options
author | obrien <obrien@FreeBSD.org> | 2002-10-11 10:07:46 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-10-11 10:07:46 +0000 |
commit | a9d5f78a61879bbe16757a7bfb7285147321437a (patch) | |
tree | fa63b63a55231bd2cc54a1a6d1ee76f5f4585ffa /gnu | |
parent | 8e75bfcf9980c7d72c556f60dd09ff7914317ec3 (diff) | |
download | FreeBSD-src-a9d5f78a61879bbe16757a7bfb7285147321437a.zip FreeBSD-src-a9d5f78a61879bbe16757a7bfb7285147321437a.tar.gz |
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.
Diffstat (limited to 'gnu')
-rwxr-xr-x | gnu/usr.bin/binutils/ld/genscripts.sh | 10 |
1 files changed, 6 insertions, 4 deletions
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 |