DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH] devtools: better freebsd support
Date: Thu, 23 May 2019 11:47:22 +0100	[thread overview]
Message-ID: <20190523104722.GA1374@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20190523074318.29044-1-olivier.matz@6wind.com>

On Thu, May 23, 2019 at 09:43:18AM +0200, Olivier Matz wrote:
> - As "readlink -e" and "readlink -m" do not exist on freebsd,
>   use "readlink -f", it should not have any impact in these cases.
> - "sed -ri" is invalid on freebsd and should be replaced by
>   "sed -r -i ''"
> - Use gmake instead of make.
> 
> This fixes the following command:
>   SYSDIR=/usr/src/sys ./devtools/test-build.sh \
>     -j4 x86_64-native-freebsd-gcc
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
>  devtools/check-dup-includes.sh |  2 +-
>  devtools/checkpatches.sh       |  8 ++--
>  devtools/get-maintainer.sh     |  2 +-
>  devtools/load-devel-config     |  4 +-
>  devtools/test-build.sh         | 98 +++++++++++++++++++++++-------------------
>  devtools/validate-abi.sh       |  2 +-
>  6 files changed, 62 insertions(+), 54 deletions(-)
> 
<snip>
>  
> +sed_ri () {
> +    sed --version >/dev/null 2>&1 && sed -ri "$@" || sed -r -i "" "$@"
> +}

Two comments here:
1. if being kept, this function needs a comment to explain the how and why
of it. I assume, from testing sed on linux and BSD, that you are taking
advantage of the fact that BSD sed doesn't support "--version" flag and
using that to select which path to take?
2. I'm not sure we really need this, or if so, it possibly can be
shortened. My tests show that using the syntax "i=" works on both OS's,
i.e. sed -ri="" "$@". Given that the only change to existing calls to sed
is the addition of '=""', a whole new function may not be needed.

/Bruce

  reply	other threads:[~2019-05-23 10:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23  7:43 Olivier Matz
2019-05-23 10:47 ` Bruce Richardson [this message]
2019-05-23 10:58   ` David Marchand
2019-07-05 13:58 ` [dpdk-dev] [PATCH v2] " Olivier Matz
2019-07-08 16:35   ` Thomas Monjalon
2019-07-11 13:06     ` Olivier Matz
2019-07-09 11:05   ` Musatescu, Flavia
2019-07-11 14:18     ` Olivier Matz
2019-07-11 14:25   ` [dpdk-dev] [PATCH v3] " Olivier Matz
2019-07-29  8:31     ` David Marchand
2019-07-29  8:36       ` David Marchand
2019-07-30 22:00       ` Thomas Monjalon

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=20190523104722.GA1374@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=thomas@monjalon.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).