git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] config.mak.uname: set PERL_PATH for FreeBSD 5.0+

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 21, 2016, 15:17 UTC
Message-ID
<alpine.DEB.2.20.1607211716100.14111@virtualbox>
In-Reply-To
<20160720180702.GA13404@starla>
Hi Eric,
On Wed, 20 Jul 2016, Eric Wong wrote:
Show 30 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > 
> > On Wed, 20 Jul 2016, Eric Wong wrote:
> > 
> > > diff --git a/config.mak.uname b/config.mak.uname
> > > index a88f139..6c29545 100644
> > > --- a/config.mak.uname
> > > +++ b/config.mak.uname
> > > @@ -202,6 +202,11 @@ ifeq ($(uname_S),FreeBSD)
> > >  		NO_UINTMAX_T = YesPlease
> > >  		NO_STRTOUMAX = YesPlease
> > >  	endif
> > > +	R_MAJOR := $(shell expr "$(uname_R)" : '\([0-9]*\)\.')
> > > +
> > > +	ifeq ($(shell test "$(R_MAJOR)" -ge 5 && echo 1),1)
> > > +		PERL_PATH = /usr/local/bin/perl
> > > +	endif
> > 
> > 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

Previous: brian m. carlson
Message 6 of 6 in “config.mak.uname: set PERL_PATH for FreeBSD 5.0+”
  1. config.mak.uname: set PERL_PATH for FreeBSD 5.0+Eric Wong, Jul 20, 2016
  2. Johannes SchindelinJul 20, 2016
  3. Eric WongJul 20, 2016
  4. Junio C HamanoJul 20, 2016
  5. brian m. carlsonJul 21, 2016
  6. Johannes SchindelinJul 21, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.