[openssl-dev] [openssl.org #4311] OpenSSL 1.1.0-pre3: quote PERL=$(PERL) in Makefiles

Richard Levitte via RT rt at openssl.org
Tue May 10 19:54:49 UTC 2016


On Tue May 10 14:56:16 2016, rainer.jung at kippdata.de wrote:
> Am 10.05.2016 um 15:29 schrieb Richard Levitte via RT:
> > On Tue May 10 13:18:22 2016, matt wrote:
> >> Makefile.in doesn't exist any more. Ping Richard Levitte - does
> >> anything need
> >> to be done for the new build system?
> >
> > The run_tests.pl line in Configurations/unix-Makefile.tmpl would
> > still need
> > that change...
> >
> > ... but I don't quite understand the background story. What you end
> > up with is
> > perl calls like this:
> >
> > /usr/bin/env perl ... blah ...
> >
> > and the difference between that and this is nil:
> >
> > perl ... blah ...
>
> No, this is about lines which set the PERL shell variable from the
> Makefile variable and then run a command on the same line, e.g.
>
> PERL=$(PERL) /path/to/something
>
> Now if the Makefile variable PERL is set to
>
> PERL=/usr/bin/env perl

I understand this part. What I'm questioning is the need to set PERL to
"/usr/bin/env perl" to begin with. It's practically not different at all from
setting it to just "perl", all this does is that any time the environment
variable PERL is used to run a perl script is to have an extra process between
the shell and perl itself that will simply pass along the exact environment
that it got from the shell. In effect, any time the environment variable PERL
with your assignment is used to run a script (assuming the quoting you
suggest), i.e.:

$PERL blah.pl

it would expand to this:

/usr/bin/env perl blah.pl

If it's only assigned "perl", the command would expand to this:

perl blah.pl

perl itself literally gets the exact same environment in both cases.

Mind you, I did read your reasoning around #! in scripts. Unfortunately, that
reasoning is flawed, that won't be affected by the environment variable PERL.

Cheers,
Richard

--
Richard Levitte
levitte at openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4311
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list