collapse plibpth to one line and remove trailing /
authorAndy Dougherty <doughera@lafayette.edu>
Mon, 18 Apr 2011 17:42:22 +0000 (13:42 -0400)
committerDavid Mitchell <davem@iabyn.com>
Mon, 18 Apr 2011 22:58:07 +0000 (23:58 +0100)
The recent change to hints/linux.sh,
40f026236b9959b7ad3260fedc6c66cd30bb7abc
set the plibpth variable.
It was supposed to set all entries on a single line, but it didn't.
Do it now, and also remove trailing /'s.

(The collapsing is a more robust version of the previous commit,
since reverted, that davem wrote independently).

hints/linux.sh

index e03ab1e..970640c 100644 (file)
@@ -164,8 +164,10 @@ esac
 # plibpth to bypass this check.
 case "$plibpth" in
 '') plibpth=`gcc -print-search-dirs | grep libraries |
-       cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'`
-    plibpth="$plibpth"  # Collapse all entries on one line
+       cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
+    set X $plibpth # Collapse all entries on one line
+    shift
+    plibpth="$*"
     ;;
 esac