Make the use of perl more consistent
authorRichard Levitte <levitte@openssl.org>
Thu, 31 Mar 2016 07:27:15 +0000 (09:27 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 1 Apr 2016 05:24:04 +0000 (07:24 +0200)
- In Configure, register the perl interpreter used to run Configure,
  so that's the one being used throughout instead of something else
  that Configure happens to find.  This is helpful for using a perl
  version that's not necessarely first in $PATH:

    /opt/perl/5.22.1/bin/perl ./Configure

- Make apps/tsget a generated file, just like apps/CA.pl, so the
  perl interpreter registered by Configure becomes the hashbang path
  instead of a hardcoded /usr/bin/perl

Reviewed-by: Andy Polyakov <appro@openssl.org>
Configurations/unix-Makefile.tmpl
Configure
apps/build.info
apps/tsget.in [moved from apps/tsget with 99% similarity]

index 67b13fa2dbaaef83bf751ea28a36b3125963d22c..bd02b8c3c2c1c08da1c326d3ae4bea9381ad79e4 100644 (file)
@@ -89,7 +89,7 @@ GENERATED={- join(" ", map { (my $x = $_) =~ s|\.S$|\.s|; $x } keys %{$unified_i
 BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
 MISC_SCRIPTS=$(SRCDIR)/tools/c_hash $(SRCDIR)/tools/c_info \
             $(SRCDIR)/tools/c_issuer $(SRCDIR)/tools/c_name \
-            $(BLDDIR)/apps/CA.pl $(SRCDIR)/apps/tsget
+            $(BLDDIR)/apps/CA.pl $(BDLDIR)/apps/tsget
 
 SHLIB_INFO={- join(" ", map { "\"".shlib($_).";".shlib_simple($_)."\"" } @{$unified_info{libraries}}) -}
 
index 34db14203ee9ff8c00e0d99964f70dadc02b12df..1caba711ea7941155d642a2ac83e1404b08e8f05 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -875,7 +875,7 @@ $config{cross_compile_prefix} = $ENV{'CROSS_COMPILE'}
     if $config{cross_compile_prefix} eq "";
 
 # Allow overriding the names of some tools.  USE WITH CARE
-$config{perl} =    $ENV{'PERL'}    || which("perl5") || which("perl") || "perl";
+$config{perl} =    $ENV{'PERL'}    || ($^O ne "VMS" ? $^X : "perl");
 $target{cc} =      $ENV{'CC'}      || $target{cc}      || "cc";
 $target{ranlib} =  $ENV{'RANLIB'}  || $target{ranlib}  || which("ranlib") || "true";
 $target{ar} =      $ENV{'AR'}      || $target{ar}      || "ar";
index d581aad4bf1557f7218a42b943deb2e994da02c6..d8ad19702ca52043d0c8f059699344f16a49bc56 100644 (file)
@@ -14,5 +14,6 @@ SOURCE[openssl]=\
 INCLUDE[openssl]={- rel2abs(catdir($builddir,"../include")) -} .. ../include
 DEPEND[openssl]=../libssl
 
-SCRIPTS=CA.pl
+SCRIPTS=CA.pl tsget
 SOURCE[CA.pl]=CA.pl.in
+SOURCE[tsget]=tsget.in
similarity index 99%
rename from apps/tsget
rename to apps/tsget.in
index da900d98a1d24fb842ab3c2f5f9ff9e269d6041f..fe029f353a04527e5a25e66eea1e24df87536835 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!{- $config{perl} -}
 # Written by Zoltan Glozik <zglozik@stones.com>.
 # Copyright (c) 2002 The OpenTSA Project.  All rights reserved.
 $::version = '$Id: tsget,v 1.3 2009/09/07 17:57:18 steve Exp $';