Re: [PATCH v4 3/4] Makefile: add Perl runtime prefix support
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Nov 29, 2017, 21:04 UTC
- Message-ID
- <87indsvlsg.fsf@evledraar.booking.com>
- In-Reply-To
- <20171129155637.89075-4-dnj@google.com>
On Wed, Nov 29 2017, Dan Jacques jotted:
Show 20 quoted lines
> + use lib split /@@PATHSEP@@/,
> + (
> + $ENV{GITPERLLIB}
> + ||
> + do {
> + require FindBin;
> + require File::Spec;
> + my $gitexecdir_relative = '@@GITEXECDIR@@';
> + my $perllibdir_relative = '@@PERLLIBDIR@@';
> +
> + ($FindBin::Bin =~ m=${gitexecdir_relative}$=) ||
> + die('Unrecognized runtime path.');
> + my $prefix = substr($FindBin::Bin, 0, -length($gitexecdir_relative));
> + my $perllibdir = File::Spec->catdir($prefix, $perllibdir_relative);
> + (-e $perllibdir) || die("Invalid library path: $perllibdir");
> + $perllibdir;
> + }
> + );
> +}
> +# END RUNTIME_PREFIX_PERL generated code.Noticed after I sent the last E-Mail, this is missing @@INSTLIBDIR@@ which per my reading of it being initially introduced should be here in addition to this relative path.
My reading of the intial patch that added it, as indicated in my patch, is that it's the dir we're going to be installing our libs to, so I didn't fiddle with it, but I think with your patches we need that dir *and* or own $perllibdir.