From: Jarkko Hietaniemi Date: Fri, 9 Feb 2001 18:12:04 +0000 (+0000) Subject: versiononly and installperl X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4a342c39eb0bb076e7a1e4b686398e9acbad0ac;p=p5sagit%2Fp5-mst-13.2.git 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 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 --- diff --git a/installperl b/installperl index dbdd6b5..4afd0a6 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;