From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 02DB2A05D3 for ; Thu, 23 May 2019 12:58:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC82D4C99; Thu, 23 May 2019 12:58:23 +0200 (CEST) Received: from mail-vs1-f65.google.com (mail-vs1-f65.google.com [209.85.217.65]) by dpdk.org (Postfix) with ESMTP id C53889E4 for ; Thu, 23 May 2019 12:58:22 +0200 (CEST) Received: by mail-vs1-f65.google.com with SMTP id y6so3315259vsb.0 for ; Thu, 23 May 2019 03:58:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Mh7eEk6Ada39ytxMefpu+HcdobvYrWAKKDE7rQOeUDA=; b=Y7b+AMOc0D3EmV0GQJFz7dA0TYcdR6UuMEZWK7HxBdHm0dsxFluFdWUwdyNJZZFZoj nFJxRn6o3nByoOhmW8JYdFIvB0Nc7pKyj/QWld05PjsgdeDsZosuX0RSrw3R8U1Zif5v qbAqtX+i9PS3stbirrUjEAE/co6pHVZZydnz+pFJv8AQgvUZk1ompi8TwEptX6ekSqRj D9WpZDDhQU6qCgdyaDFMkCAnyYtEwMu/UMMoe38946tQyaQEFBIfTot5PZhajmG4iMKN +3/eOctpiTQ2hQ4/T+YSUqifITIN72NGe/7t0H3QPWgZR4nR1SNvXlhRNrntzJM234tV YtUA== X-Gm-Message-State: APjAAAXkCKzsMc5Pxs2RLVXpQUsQqjUlbZ7vmnKaZbG/UYQgbcv9ze+A dhKE7pN26G5Wgz/thlVeRpKWXOHFZvYRQE5kvoEHbQ== X-Google-Smtp-Source: APXvYqx5M6y1QG/rvcuiUSIbZIRN7/XmC+B/uX1SHv6+Dg+HW6P8L83+PbeQltyOlHg81FazH1ZGF2SoTRybpfAB2L0= X-Received: by 2002:a67:d615:: with SMTP id n21mr33183229vsj.39.1558609102143; Thu, 23 May 2019 03:58:22 -0700 (PDT) MIME-Version: 1.0 References: <20190523074318.29044-1-olivier.matz@6wind.com> <20190523104722.GA1374@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190523104722.GA1374@bricha3-MOBL.ger.corp.intel.com> From: David Marchand Date: Thu, 23 May 2019 12:58:11 +0200 Message-ID: To: Bruce Richardson Cc: Olivier Matz , dev , Thomas Monjalon Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] devtools: better freebsd support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, May 23, 2019 at 12:47 PM Bruce Richardson < bruce.richardson@intel.com> wrote: > 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 > > --- > > 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(-) > > > > > > > +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. > > Ah, I had done the same comments offlist but I had not caught the i= syntax :-) +1 -- David Marchand