summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2019-07-25 15:53:40 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2019-07-25 15:53:40 +0200
commitb43c708ad6587be0945a81b1f04142f110ecb471 (patch)
tree85aa78de5237311fe31e5a9eaf051dd94a6392bd /Configure
parentc8abed4aa5f30e504657d68bbf7b480e264f575f (diff)
downloadperl-b43c708ad6587be0945a81b1f04142f110ecb471.tar.gz
Remove trailing '/' from prefix
Change how/when the trailing '/' from a prefix is removed. The original code had two problems: 1) it only stripped the trailing slash when value was predefined (either from -Dprefix=/foo/bar/ or from a previous configure run) 2) when it did strip the value then it also caused 'oldprefix' to be set. This in turns causes other predefined (/cached) paths to be ignored. See https://rt.perl.org/Public/Bug/Display.html?id=134284
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure28
1 files changed, 16 insertions, 12 deletions
diff --git a/Configure b/Configure
index 5c022556d0..3ab45a4c4b 100755
--- a/Configure
+++ b/Configure
@@ -4169,14 +4169,9 @@ EOSC
: determine root of directory hierarchy where package will be installed.
case "$prefix" in
-'')
- dflt=`./loc . /usr/local /usr/local /local /opt /usr`
- ;;
-*?/)
- dflt=`echo "$prefix" | sed 's/.$//'`
+'') dflt=`./loc . /usr/local /usr/local /local /opt /usr`
;;
-*)
- dflt="$prefix"
+*) dflt="$prefix"
;;
esac
$cat <<EOM
@@ -4195,16 +4190,25 @@ rp='Installation prefix to use?'
. ./getfile
oldprefix=''
case "$prefix" in
-'') ;;
-*)
- case "$ans" in
+'') ;;
+*) case "$ans" in
"$prefix") ;;
*) oldprefix="$prefix";;
esac
;;
esac
-prefix="$ans"
-prefixexp="$ansexp"
+
+case "$ans" in
+*?/) prefix=`echo "$ans" | sed 's/.$//'`
+ ;;
+*) prefix="$ans"
+esac
+
+case "$ansexp" in
+*?/) prefixexp=`echo "$ansexp" | sed 's/.$//'`
+ ;;
+*) prefixexp="$ansexp"
+esac
: allow them to override the AFS root
case "$afsroot" in