In keeping with other uname_R usage, should this not read
# Since FreeBSD 5.0, Perl is part of the core
ifneq ($(shell expr "$(uname_R)" : '[1-4]\.'),2)
PERL_PATH = /usr/local/bin/perl
endif
instead?
Ciao,
Dscho
In keeping with other uname_R usage, should this not read
# Since FreeBSD 5.0, Perl is part of the core
ifneq ($(shell expr "$(uname_R)" : '[1-4]\.'),2)
PERL_PATH = /usr/local/bin/perl
endif
instead?
That's fine; however I don't use `expr` often, so it required
a little more time to realize the '2' means 2 characters were
matched.
Also, my use of a numeric comparison may be more future-proof
in case FreeBSD decides to have /usr/bin/perl again.
I also wonder why we don't use `which` to search for somewhat
standard path components, instead. Something like:
PERL_PATH = $(shell PATH=/bin:/usr/bin:/usr/local/bin which perl)
From: Junio C Hamano <hidden> Date: 2016-07-20 18:11:10
On Wed, Jul 20, 2016 at 11:07 AM, Eric Wong [off-list ref] wrote:
Also, my use of a numeric comparison may be more future-proof
in case FreeBSD decides to have /usr/bin/perl again.
I also wonder why we don't use `which` to search for somewhat
standard path components, instead. Something like:
Because historically output from "which" was not meant to be
machine parseable (some implementation said 'perl is /usr/bin/perl')
From: brian m. carlson <hidden> Date: 2016-07-21 01:02:19
On Wed, Jul 20, 2016 at 11:10:40AM -0700, Junio C Hamano wrote:
On Wed, Jul 20, 2016 at 11:07 AM, Eric Wong [off-list ref] wrote:
quoted
Also, my use of a numeric comparison may be more future-proof
in case FreeBSD decides to have /usr/bin/perl again.
I also wonder why we don't use `which` to search for somewhat
standard path components, instead. Something like:
Because historically output from "which" was not meant to be
machine parseable (some implementation said 'perl is /usr/bin/perl')
The POSIXy way to write which is "command -v", which may or may not be
more portable. It does have the desired output, though.
--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
In keeping with other uname_R usage, should this not read
# Since FreeBSD 5.0, Perl is part of the core
ifneq ($(shell expr "$(uname_R)" : '[1-4]\.'),2)
PERL_PATH = /usr/local/bin/perl
endif
instead?
That's fine; however I don't use `expr` often, so it required
a little more time to realize the '2' means 2 characters were
matched.
I never use `expr`, so I had to go and see the surrounding code to
determine what the code style is.
Also, my use of a numeric comparison may be more future-proof
in case FreeBSD decides to have /usr/bin/perl again.
That is a very theoretical concern ;-)
Ciao,
Dscho