From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by dpdk.org (Postfix) with ESMTP id BD2FB5A53 for ; Wed, 6 Jul 2016 07:37:38 +0200 (CEST) Received: by mail-qk0-f174.google.com with SMTP id t127so306921958qkf.1 for ; Tue, 05 Jul 2016 22:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xrKAiBCvxwjB70fL46zvZeS3MmuJ0ZeMM0lk7ceyjN8=; b=ecY6idXidCB6lEuP3eXSpooq+uHseB1ENOU1uEm4zXjhl6XDk/1dha1H3OHe/HgC/7 +G/unZDhhcc9QKfknIv8FTdOaarE2Zh6fHZ0HWupfatJaEu/on7vd+j85s4+PGPZhy2B 3a14DoBdKnNIkbwlGRJRGWDXr4XGO4feQaSoQm0eNPknat6rqPqSQ5P9PVLgUoMFZSO8 U8BM9ZQPuciB1UeDrVKx3ZgWSgI7dzpfZjzkFCbY7JlKz2q164VqkZqSXAUfoKBTDZLf 5/JsrQ96ndzyc06PbJtOmjum5af9Z8BqBtafmZVjbSS5Iy4h2GZVIsPY/ye1U0DOpPEx T+wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xrKAiBCvxwjB70fL46zvZeS3MmuJ0ZeMM0lk7ceyjN8=; b=c/XppC98LdGk5M6yB4vGyJ+p9Pk6GcHHOcRDurgKuQxcj4J3DSDiM6mnnLX/Fx+xw7 tyg9TxTWeeujRCMEtSG49yFMCc8b42YfCfzrgqzCuyyx77ChuoXrY2zFk3BCyIRRTooX pxn7CgDUX9You+jEPAMOWeMO3OWuPXlAIT7e3JsGb09jcnH9SxFbUQMDXEr5ZNInHAqS S4uckpL4XB24pQSIUMrkR2EqPAKF/bN8HGLetC9JbBYdATIZmjEfT5hPJcrPwHJCxpjB /y4t40730MnBPNodETbMyFpnpn9v60aNirdOv4SMqo8kGF3HL8K437S+irFEw7cFHz4U zvAw== X-Gm-Message-State: ALyK8tJtewOMk0hRuYa7qTAUZ1NfXsSTTgOD5xMYCWcdJAu/U6F0+jfZTzd8xtpAIkEeImvmvscP1fFvrPD03dt9 X-Received: by 10.55.69.69 with SMTP id s66mr29581965qka.117.1467783458130; Tue, 05 Jul 2016 22:37:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.23.77 with HTTP; Tue, 5 Jul 2016 22:37:18 -0700 (PDT) In-Reply-To: <2194981.Lpk1XbM1Qo@xps13> References: <1467288021-23950-1-git-send-email-christian.ehrhardt@canonical.com> <577BE4A1.3040302@intel.com> <2194981.Lpk1XbM1Qo@xps13> From: Christian Ehrhardt Date: Wed, 6 Jul 2016 07:37:18 +0200 Message-ID: To: Thomas Monjalon Cc: Ferruh Yigit , dev Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2] mk: filter duplicate configuration entries X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2016 05:37:39 -0000 Hi, I came up with something very similar when looking for tac replacements yesterday, but had no time to finish things. But your suggestion is even shorter - I had found "sed -n '1{h;T;};G;h;$p;' file" or "sed -n '1!G;h;$p'". That removes the tac dependency, which I agree is a good thing. To chain things up without a temp file one would need the "in-place" features of sed&awk which I'm not sure they are available (awk >=4.1 and only GNU awk). sed -i is only used in validate-abi.sh which might not be used on all platforms to count as "-i is there already so I can use it". And I really don't want to break anyone due to that change, just naively clean up the resulting config a bit. Also we already have a temp file .config_tmp in the same scope and remove it on our own. So it is not that much different to create and remove a second one for that section. Thanks for both of your feedback, submitting v3 now ... Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd On Tue, Jul 5, 2016 at 9:47 PM, Thomas Monjalon wrote: > 2016-07-05 17:47, Ferruh Yigit: > > On 6/30/2016 1:00 PM, Christian Ehrhardt wrote: > > > + tac $(RTE_OUTPUT)/.config_tmp > > $(RTE_OUTPUT)/.config_tmp_reverse ; \ > > Now we are adding new binary dependency (tac) to build system > > tac can be replaced by sed '1!G;h;$!d' > >