[openssl-dev] [openssl.org #4311] OpenSSL 1.1.0-pre3: quote PERL=$(PERL) in Makefiles
Rainer Jung via RT
rt at openssl.org
Tue Feb 16 18:34:01 UTC 2016
Hi there,
I built OpenSSL 1.1.0-pre3 with
PERL="/usr/bin/env perl"
This has the nice effect, that any generated perl artefact that itself
uses perl via the "#!" notation contains
#!/usr/bin/env perl
and not the perl path to which "/usr/bin/env perl" resolves during build
time on the build machine.
The only tweak I had to apply to make this work, was quoting a few lines
that use PERL=$(PERL) in Makefile.in:
--- Makefile.in 2016-02-15 20:51:46.000000000 +0100
+++ Makefile.in 2016-02-16 00:28:16.510730000 +0100
@@ -512,8 +512,8 @@
errors:
$(PERL) util/ck_errf.pl -strict */*.c */*/*.c
$(PERL) util/mkerr.pl -recurse -write
- (cd engines; $(MAKE) PERL=$(PERL) errors)
- (cd crypto/ct; $(MAKE) PERL=$(PERL) errors)
+ (cd engines; $(MAKE) PERL="$(PERL)" errors)
+ (cd crypto/ct; $(MAKE) PERL="$(PERL)" errors)
ordinals: util/libeay.num util/ssleay.num test_ordinals TABLE
util/libeay.num::
@@ -521,7 +521,7 @@
util/ssleay.num::
$(PERL) util/mkdef.pl ssl update
test_ordinals:
- TOP=$(TOP) PERL=$(PERL) $(PERL) test/run_tests.pl test_ordinals
+ TOP=$(TOP) PERL="$(PERL)" $(PERL) test/run_tests.pl test_ordinals
TABLE: Configure Configurations/*.conf
(echo 'Output of `Configure TABLE'"':"; \
--- test/Makefile.in 2016-02-15 20:51:48.000000000 +0100
+++ test/Makefile.in 2016-02-16 00:28:16.545897000 +0100
@@ -155,12 +155,12 @@
@sh $(TOP)/util/point.sh dummytest.c $@
tests: exe apps
- TOP=$(TOP) PERL=$(PERL) $(PERL) run_tests.pl $(TESTS)
+ TOP=$(TOP) PERL="$(PERL)" $(PERL) run_tests.pl $(TESTS)
errors:
list-tests:
- @TOP=$(TOP) PERL=$(PERL) $(PERL) run_tests.pl list
+ @TOP=$(TOP) PERL="$(PERL)" $(PERL) run_tests.pl list
apps:
@(cd ..; $(MAKE) DIRS=apps all)
You might want to consider this change.
Looking through all assignments in Makefile.in files and ignoring the
possible use of paths with spaces (people shouldn't use them), i see one
other line which might benefit from quoting. It is in test/Makefile.in:
top:
(cd ..; $(MAKE) DIRS=$(DIR) TESTS=$(TESTS) all)
Here the TESTS=$(TESTS) by default assigns "alltests" which is just one
token, but the plural form of the variable suggests one could also set
it to contain multiple test names and then the above line might fail.
Regards and thanks,
Rainer
--
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