summaryrefslogtreecommitdiff
path: root/installperl
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-02-09 18:12:04 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-09 18:12:04 +0000
commitf4a342c39eb0bb076e7a1e4b686398e9acbad0ac (patch)
treef72debd892e839f4317bc4fdfa4ce67c211932b2 /installperl
parent087fe2279b25c4cb7ed0ead046e59772528a119c (diff)
downloadperl-f4a342c39eb0bb076e7a1e4b686398e9acbad0ac.tar.gz
versiononly and installperl
From: abigail@foad.org Date: Wed, 7 Feb 2001 22:43:12 +0100 Message-ID: <20010207214312.7045.qmail@foad.org> Add +v flag to force a normal install of the perl binary and the utilities. Subject: [PATCH] installperl From: Nicholas Clark <nick@ccl4.org> Date: Fri, 9 Feb 2001 16:28:57 +0000 Message-ID: <20010209162857.B10931@plum.flirble.org> Add -A flag which also hardlinks the binary with the full architecture name. p4raw-id: //depot/perl@8747
Diffstat (limited to 'installperl')
-rwxr-xr-xinstallperl21
1 files changed, 19 insertions, 2 deletions
diff --git a/installperl b/installperl
index dbdd6b558e..4afd0a6310 100755
--- a/installperl
+++ b/installperl
@@ -9,7 +9,7 @@ BEGIN {
use strict;
my ($Is_VMS, $Is_W32, $Is_OS2, $Is_Cygwin, $nonono, $dostrip,
- $versiononly, $silent, $verbose, $otherperls);
+ $versiononly, $silent, $verbose, $otherperls, $archname);
use vars qw /$depth/;
BEGIN {
@@ -54,13 +54,15 @@ while (@ARGV) {
$nonono = 1 if $ARGV[0] eq '-n';
$dostrip = 1 if $ARGV[0] eq '-s';
$versiononly = 1 if $ARGV[0] eq '-v';
+ $versiononly = 0 if $ARGV[0] eq '+v';
$silent = 1 if $ARGV[0] eq '-S';
$otherperls = 0 if $ARGV[0] eq '-o';
$verbose = 1 if $ARGV[0] eq '-V' || $ARGV [0] eq '-n';
+ $archname = 1 if $ARGV[0] eq '-A';
shift;
}
-$versiononly = 1 if $Config{versiononly};
+$versiononly = 1 if $Config{versiononly} && !defined $versiononly;
my @scripts = qw(utils/c2ph utils/h2ph utils/h2xs utils/perlbug utils/perldoc
utils/pl2pm utils/splain utils/perlcc utils/dprofpp
@@ -320,6 +322,21 @@ if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VM
if $d_dosuid;
}
+# For development purposes it can be very useful to have multiple perls
+# build for different "architectures" (eg threading or not) simultaneously.
+if ($archname && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS) {
+ my $archperl = "$perl_verbase$ver-$Config{archname}$exe_ext";
+ safe_unlink("$installbin/$archperl");
+ if ($^O eq 'mpeix') {
+ # MPE doesn't support hard links, so use a symlink.
+ # We don't want another cloned copy.
+ symlink($Config{perlpath}, "$installbin/$archperl");
+ } else {
+ link("$installbin/$perl_verbase$ver$exe_ext",
+ "$installbin/$archperl");
+ }
+}
+
# Offer to install perl in a "standard" location
my $mainperl_is_instperl = 0;