From 19cdd938610e6630d58bd5b0fd311a80f6e54647 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 17 Jan 2020 14:40:44 +0000 Subject: Fix Perl tools not using the correct directory name in 'use lib'. --- tools/genssl | 2 +- tools/mkheaders | 11 ++++++----- tools/test-build | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/genssl b/tools/genssl index 9c6cc3804..6061f2e34 100755 --- a/tools/genssl +++ b/tools/genssl @@ -34,7 +34,7 @@ use File::Temp(); sub prompt($$) { my ($question, $default) = @_; - return prompt_string(1, $question, $default) if eval 'use FindBin;use lib $FindBin::RealDir;use make::console; 1'; + return prompt_string(1, $question, $default) if eval 'use File::Basename; use FindBin; use lib dirname($FindBin::RealDir); use make::console; 1'; say $question; print "[$default] => "; chomp(my $answer = ); diff --git a/tools/mkheaders b/tools/mkheaders index a8763e9d7..4b1f370f3 100755 --- a/tools/mkheaders +++ b/tools/mkheaders @@ -30,12 +30,13 @@ use feature ':5.10'; use strict; use warnings FATAL => qw(all); -use File::Util (); -use FindBin qw($RealDir); -use List::Util qw(uniq); -use POSIX qw(strftime); +use File::Basename qw(dirname); +use File::Util (); +use FindBin qw($RealDir); +use List::Util qw(uniq); +use POSIX qw(strftime); -use lib $RealDir; +use lib dirname $RealDir; use make::console; my @ignored_revisions = ( diff --git a/tools/test-build b/tools/test-build index 773ddee64..978b60bc1 100755 --- a/tools/test-build +++ b/tools/test-build @@ -30,9 +30,10 @@ use feature ':5.10'; use strict; use warnings FATAL => qw(all); -use FindBin qw($RealDir); +use File::Basename qw(dirname); +use FindBin qw($RealDir); -use lib $RealDir; +use lib dirname $RealDir; use make::common; use make::configure; -- cgit v1.2.3