diff options
author | Sadie Powell <sadie@witchery.services> | 2020-01-17 14:40:44 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-01-17 15:35:20 +0000 |
commit | 19cdd938610e6630d58bd5b0fd311a80f6e54647 (patch) | |
tree | b8c8ad671fa76ccdf557d63725e1f81e5bd0f9ac | |
parent | 5ae65245221dfad24510ee9a1fbead8db740251f (diff) |
Fix Perl tools not using the correct directory name in 'use lib'.
-rwxr-xr-x | tools/genssl | 2 | ||||
-rwxr-xr-x | tools/mkheaders | 11 | ||||
-rwxr-xr-x | 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 = <STDIN>); 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; |