summaryrefslogtreecommitdiff
path: root/configure.com
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2013-12-28 11:22:28 -0600
committerCraig A. Berry <craigberry@mac.com>2013-12-28 11:22:28 -0600
commitb545184ec397e90a1e25844a1f0c830dec9ee6dc (patch)
tree1d3101ff45a2e53142cd1e474ec5583834ba0137 /configure.com
parent7ff1117359e03ce00638e9ee1daad537321e75d6 (diff)
downloadperl-b545184ec397e90a1e25844a1f0c830dec9ee6dc.tar.gz
Make perl_setup.com infer perl_root from its own location.
The perl_setup.com command procedure initializes the root logical name, the shareable image logical name pointing to the main Perl dynamic library, and either command symbols or command table entries that reference those logical names. It's always by default hard-coded the prefix chosen at configuration time as the basis for where Perl should be located. The original rationale for that was that it gets run right before installperl and sets things up correctly for installation. But that optimizes for a single use case that is easily handled by specifying the correct install location as a parameter and pessimizes for every other use case, notably relocating an installed Perl directory tree. So make it infer the correct root from its own location and specify the install location only at installation time. Among other benefits, this allows the install location to be chosen at installation time by overriding the default prefix like so: MMK/MACRO=(PREFIX="DSA0:[homedir.MyPerl2.]") install
Diffstat (limited to 'configure.com')
-rw-r--r--configure.com35
1 files changed, 16 insertions, 19 deletions
diff --git a/configure.com b/configure.com
index 6135dfaefa..db9f0be0db 100644
--- a/configure.com
+++ b/configure.com
@@ -7041,6 +7041,7 @@ $ DEBUG_REPLACE = "USEVMSDEBUG=__DEBUG__=1"
$ ELSE
$ DEBUG_REPLACE = "USEVMSDEBUG="
$ ENDIF
+$ PREFIX_REPLACE = "PREFIX=PREFIX=''prefix'"
$!
$! In order not to stress the tiny command buffer on pre-7.3-2 systems,
$! we put the following substitutions in a file and pass the file to
@@ -7063,6 +7064,7 @@ $ WC "FLAGS=FLAGS=''extra_flags'"
$ WC "''LARGEFILE_REPLACE'"
$ WC "ARCHNAME=ARCHNAME=''archname'"
$ WC "''DEBUG_REPLACE'"
+$ WC "''PREFIX_REPLACE'"
$ close CONFIG
$!
$ echo4 "Extracting ''defmakefile' (with variable substitutions)"
@@ -7230,25 +7232,20 @@ $ ELSE
$ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
$ ENDIF
$ WRITE CONFIG "$!"
-$! HP hack to make distributing binaries easier
-$!----------------------------------------------
-$ pcsi_producer = f$trnlnm("PCSI_PRODUCER")
-$ if pcsi_producer .eqs. ""
-$ then
-$ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'"
-$ else
-$ WRITE CONFIG "$ myproc = f$environment(""PROCEDURE"")"
-$ WRITE CONFIG "$ myroot_dev = f$parse(myproc,,,""DEVICE"",""NO_CONCEAL"")"
-$ WRITE CONFIG "$ myroot_dir = f$parse(myproc,,,""DIRECTORY"",""NO_CONCEAL"")"
-$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000."" - ""><000000."""
-$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000]"" - ""><000000>"""
-$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""]["" - ""><"""
-$ WRITE CONFIG "$ myroot_dir = myroot_dir - "".]"" - "".>"" - ""["" - ""]"" - ""<"" - "">"""
-$ WRITE CONFIG "$ if f$trnlnm(""HP_BUILD_PERL_BIN_KIT"",""LNM$PROCESS_TABLE"") .EQS. """""
-$ WRITE CONFIG "$ then"
-$ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' 'myroot_dev'['myroot_dir'.]"
-$ WRITE CONFIG "$ endif"
-$ endif
+$ WRITE CONFIG "$ if P1 .EQS. """""
+$ WRITE CONFIG "$ then"
+$ WRITE CONFIG "$ myproc = f$environment(""PROCEDURE"")"
+$ WRITE CONFIG "$ myroot_dev = f$parse(myproc,,,""DEVICE"",""NO_CONCEAL"")"
+$ WRITE CONFIG "$ myroot_dir = f$parse(myproc,,,""DIRECTORY"",""NO_CONCEAL"")"
+$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000."" - ""><000000."""
+$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000]"" - ""><000000>"""
+$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""]["" - ""><"""
+$ WRITE CONFIG "$ myroot_dir = myroot_dir - "".]"" - "".>"" - ""["" - ""]"" - ""<"" - "">"""
+$ WRITE CONFIG "$ root_spec = myroot_dev + ""["" + myroot_dir + "".]"""
+$ WRITE CONFIG "$ else"
+$ WRITE CONFIG "$ root_spec = P1"
+$ WRITE CONFIG "$ endif"
+$ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' 'root_spec'"
$ WRITE CONFIG "$ ext = "".exe"""
$ IF sharedperl
$ THEN