From: Jeff King <peff@peff.net>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases
Date: Tue, 2 Jun 2015 14:44:13 -0400 [thread overview]
Message-ID: <20150602184413.GA11437@peff.net> (raw)
In-Reply-To: <1433269138-10890-2-git-send-email-sunshine@sunshineco.com>
On Tue, Jun 02, 2015 at 02:18:57PM -0400, Eric Sunshine wrote:
> The use of 'expr' in this new test is decidedly different from existing
> instances which merely check if `uname -R` matches a particular single
> digit and a period. If the new test took the same approach, it would
> have to match either one digit (in a particular range) plus a period, or
> two digits with the first being "1", plus a period. The resulting 'expr'
> expression quickly becomes ugly and quite difficult to decipher. Hence,
> the new test instead takes advantage of expr's relational operator '>='
> to keep things simple and make the test easy to understand at a glance
> ("if version >= 11" where 11 is the Darwin major version number of OS X
> 10.7).
I think that is OK with respect to portability; we are already inside a
$(uname_S) check, so we know we are on some form of Mac OS. But...
> + ifeq ($(shell expr $(shell expr "$(uname_R)" : '\([0-9][0-9]*\)\.') '>=' 11),1)
Do you need to spawn two shells? It seems like:
$(shell expr `expr "$(uname_R)" : '\([0-9][0-9]*\)'` '>=' 11),1)
should do the same thing.
-Peff
next prev parent reply other threads:[~2015-06-02 18:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 18:18 [PATCH 0/2] auto-detect getdelim() Eric Sunshine
2015-06-02 18:18 ` [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases Eric Sunshine
2015-06-02 18:44 ` Jeff King [this message]
2015-06-02 19:04 ` Jeff King
2015-06-02 19:57 ` Eric Sunshine
2015-06-02 20:01 ` Jeff King
2015-06-02 20:17 ` Eric Sunshine
2015-06-02 18:18 ` [PATCH 2/2] configure: add getdelim() check Eric Sunshine
2015-06-02 18:45 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150602184413.GA11437@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.