Skip to content

Commit

Permalink
Restore a reference to $perlpath. Installation needs it
Browse files Browse the repository at this point in the history
cbeaa18 removed the reference to $perlpath
  • Loading branch information
H.Merijn Brand committed Dec 21, 2010
1 parent f0c420d commit 91f55cc
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 70 deletions.
173 changes: 103 additions & 70 deletions Configure
Expand Up @@ -30,7 +30,7 @@

# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
# Generated on Mon Dec 20 16:52:31 CET 2010 [metaconfig 3.5 PL0]
# Generated on Tue Dec 21 12:45:44 CET 2010 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)

cat >c1$$ <<EOF
Expand Down Expand Up @@ -1080,6 +1080,7 @@ version=''
version_patchlevel_string=''
perl5=''
perladmin=''
perlpath=''
d_nv_preserves_uv=''
d_nv_zero_is_allbits_zero=''
i16size=''
Expand Down Expand Up @@ -8915,6 +8916,106 @@ rp='Perl administrator e-mail address'
. ./myread
perladmin="$ans"

: determine whether to only install version-specific parts.
echo " "
$cat <<EOM
Do you want to install only the version-specific parts of the perl
distribution? Usually you do *not* want to do this.
EOM
case "$versiononly" in
"$define"|[Yy]*|true) dflt='y' ;;
*) dflt='n';
esac
rp="Do you want to install only the version-specific parts of perl?"
. ./myread
case "$ans" in
[yY]*) val="$define";;
*) val="$undef" ;;
esac
set versiononly
eval $setvar

case "$versiononly" in
"$define") inc_version_list=''
inc_version_list_init=0
;;
esac

: figure out how to guarantee perl startup
: XXX Note that this currently takes advantage of the bug that binexp ignores
: the Configure -Dinstallprefix setting, which in turn means that under
: relocatable @INC, initialinstalllocation is what binexp started as.
case "$startperl" in
'')
case "$sharpbang" in
*!)
$cat <<EOH

I can use the #! construct to start perl on your system. This will
make startup of perl scripts faster, but may cause problems if you
want to share those scripts and perl is not in a standard place
($initialinstalllocation/perl) on all your platforms. The alternative
is to force a shell by starting the script with a single ':' character.

EOH
case "$versiononly" in
"$define") dflt="$initialinstalllocation/perl$version";;
*) dflt="$initialinstalllocation/perl";;
esac
rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
. ./myread
case "$ans" in
none) startperl=": # use perl";;
*) startperl="#!$ans"
if $test 30 -lt `echo "$ans" | wc -c`; then
$cat >&4 <<EOM

WARNING: Some systems limit the #! command to 32 characters.
If you experience difficulty running Perl scripts with #!, try
installing Perl in a directory with a shorter pathname.

EOM
fi ;;
esac
;;
*) startperl=": # use perl"
;;
esac
;;
esac
echo "I'll use $startperl to start perl scripts."

: figure best path for perl in scripts
case "$perlpath" in
'')
case "$versiononly" in
"$define") perlpath="$initialinstalllocation/perl$version";;
*) perlpath="$initialinstalllocation/perl";;
esac
case "$startperl" in
*!*) ;;
*)
$cat <<EOH

I will use the "eval 'exec'" idiom to start Perl on your system.
I can use the full path of your Perl binary for this purpose, but
doing so may cause problems if you want to share those scripts and
Perl is not always in a standard place ($initialinstalllocation/perl).

EOH
dflt="$initialinstalllocation/perl"
rp="What path shall I use in \"eval 'exec'\"?"
. ./myread
perlpath="$ans"
;;
esac
;;
esac
case "$startperl" in
*!*) ;;
*) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
esac

: determine where public executable scripts go
set scriptdir scriptdir
eval $prefixit
Expand Down Expand Up @@ -9036,75 +9137,6 @@ rp='Pathname where add-on public executable scripts should be installed?'
prefixvar=sitescript
. ./setprefixvar

: determine whether to only install version-specific parts.
echo " "
$cat <<EOM
Do you want to install only the version-specific parts of the perl
distribution? Usually you do *not* want to do this.
EOM
case "$versiononly" in
"$define"|[Yy]*|true) dflt='y' ;;
*) dflt='n';
esac
rp="Do you want to install only the version-specific parts of perl?"
. ./myread
case "$ans" in
[yY]*) val="$define";;
*) val="$undef" ;;
esac
set versiononly
eval $setvar

case "$versiononly" in
"$define") inc_version_list=''
inc_version_list_init=0
;;
esac

: figure out how to guarantee perl startup
: XXX Note that this currently takes advantage of the bug that binexp ignores
: the Configure -Dinstallprefix setting, which in turn means that under
: relocatable @INC, initialinstalllocation is what binexp started as.
case "$startperl" in
'')
case "$sharpbang" in
*!)
$cat <<EOH

I can use the #! construct to start perl on your system. This will
make startup of perl scripts faster, but may cause problems if you
want to share those scripts and perl is not in a standard place
($initialinstalllocation/perl) on all your platforms. The alternative
is to force a shell by starting the script with a single ':' character.

EOH
case "$versiononly" in
"$define") dflt="$initialinstalllocation/perl$version";;
*) dflt="$initialinstalllocation/perl";;
esac
rp='What shall I put after the #! to start up perl ("none" to not use #!)?'
. ./myread
case "$ans" in
none) startperl=": # use perl";;
*) startperl="#!$ans"
if $test 30 -lt `echo "$ans" | wc -c`; then
$cat >&4 <<EOM

WARNING: Some systems limit the #! command to 32 characters.
If you experience difficulty running Perl scripts with #!, try
installing Perl in a directory with a shorter pathname.

EOM
fi ;;
esac
;;
*) startperl=": # use perl"
;;
esac
;;
esac
echo "I'll use $startperl to start perl scripts."

: Check if faststdio is requested and available
case "$usefaststdio" in
$define|true|[yY]*|'')
Expand Down Expand Up @@ -23220,6 +23252,7 @@ perl_patchlevel='$perl_patchlevel'
perl_static_inline='$perl_static_inline'
perladmin='$perladmin'
perllibs='$perllibs'
perlpath='$perlpath'
pg='$pg'
phostname='$phostname'
pidtype='$pidtype'
Expand Down
3 changes: 3 additions & 0 deletions Makefile.SH
Expand Up @@ -34,6 +34,9 @@ esac
# Mentioned for the same reason for future reference
# #23434 $d_strlcat $d_strlcpy

# H.Merijn Brand [21 Dec 2010]
# cbeaa1895 removed the reference to $perlpath

: This forces SH files to create target in same directory as SH file.
: This is so that make depend always knows where to find SH derivatives.
case "$0" in
Expand Down
11 changes: 11 additions & 0 deletions Porting/Glossary
Expand Up @@ -4155,6 +4155,17 @@ perllibs (End.U):
The list of libraries needed by Perl only (any libraries needed
by extensions only will by dropped, if using dynamic loading).

perlpath (perlpath.U):
This variable contains the eventual value of the PERLPATH symbol,
which contains the name of the perl interpreter to be used in
shell scripts and in the "eval 'exec'" idiom. This variable is
not necessarily the pathname of the file containing the perl
interpreter; you must append the executable extension (_exe) if
it is not already present. Note that Perl code that runs during
the Perl build process cannot reference this variable, as Perl
may not have been installed, or even if installed, may be a
different version of Perl.

pg (Loc.U):
This variable is used internally by Configure to determine the
full pathname (if any) of the pg program. After Configure runs,
Expand Down

0 comments on commit 91f55cc

Please sign in to comment.