From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2ADEC49ED7 for ; Mon, 16 Sep 2019 22:02:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B756F206C2 for ; Mon, 16 Sep 2019 22:02:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DLKtESLH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732474AbfIPWCG (ORCPT ); Mon, 16 Sep 2019 18:02:06 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:34225 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730459AbfIPWCF (ORCPT ); Mon, 16 Sep 2019 18:02:05 -0400 Received: by mail-qk1-f196.google.com with SMTP id q203so1696648qke.1; Mon, 16 Sep 2019 15:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bBLyhw31asDlP3KaGnYqHfV7kPwJZ+ePQIhLUhYQq/A=; b=DLKtESLHU3yBGqlehMqSQrTPtHUvgFrzUz0kljjkJWZZtuitfwKiQFXCyHIFOIXi77 f27waV1lV4S/j+0v32Py8CziL5dMIBrqFKRrI1AmJhNEnC/NrlMGLKpBVrdxOX1z1cJf mZimqaZ1mQf5RIIzVRm2hPh9KdQMTQcKi5wBzm6NYUdrh3zkrW2GZzdR49IM74Z4U9jx i83K9Y9wu1Sr0Zs45duucHo04Ux+TMntBd1km9iikE+251BTw8RSfGfNtymAabFa2XuR FXEOSAoM9JNcxba+Y+pfU8nGZ3Ic3s9wyPQ8NZsywOy5VwzuOvGXrIvaXzEJCmLRa/Pm Km0g== 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=bBLyhw31asDlP3KaGnYqHfV7kPwJZ+ePQIhLUhYQq/A=; b=PsWqk0YaTpAW4qV/5WInmRjqGV7OcYBfFNTUsX6RVF+88ixjZARm5Vi13c9JNrtGoE d59QilymzjNAbtM5nOuNhUGEWl4aTuNt3FtJfqBP6sb3Exvr3W3WleqzXxX6v9jQ2ri5 2JtG0vrZUuJr1cS1zydIxgwmfwvN6XArV7TOjS3gaQ4X3a0u8lUJLft7eMkFJavgvJ6C 1oh2Br19JjMl+DNWp1MtbdyMfJ3xswegZugHwkXJRi9FlBkyw/tLNEAZzlMF+s/Mg4cW SSVZWLNiquMkIRocYcm6vIMdED6wc4UwQRUXXGdmCcOpLu0XOt/WItFwpYxKFih+NnXi 7xJA== X-Gm-Message-State: APjAAAW3HV8r7JshRi0OFMTz4LUyuuN0LU1OiYJFQhLL1WRP1Q83l3D+ gh3DoivqC8EswZMZBzkU4UzFHGzl2mfX3e0OZUE= X-Google-Smtp-Source: APXvYqwrjLnzLhIeWCJgeHld79aMAAa21d7PB4k96iCLLkOJd04ymTYy8cBDfY/3O4zvG2IROfmBAzcYZgthBSsmc1w= X-Received: by 2002:a37:98f:: with SMTP id 137mr531581qkj.449.1568671323725; Mon, 16 Sep 2019 15:02:03 -0700 (PDT) MIME-Version: 1.0 References: <20190916105433.11404-1-ivan.khoronzhuk@linaro.org> <20190916105433.11404-2-ivan.khoronzhuk@linaro.org> <8736gvexfz.fsf@igel.home> In-Reply-To: <8736gvexfz.fsf@igel.home> From: Andrii Nakryiko Date: Mon, 16 Sep 2019 15:01:52 -0700 Message-ID: Subject: Re: [PATCH v3 bpf-next 01/14] samples: bpf: makefile: fix HDR_PROBE "echo" To: Andreas Schwab Cc: Ivan Khoronzhuk , Alexei Starovoitov , Daniel Borkmann , Yonghong Song , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , john fastabend , open list , Networking , bpf , clang-built-linux@googlegroups.com, sergei.shtylyov@cogentembedded.com Content-Type: text/plain; charset="UTF-8" Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Mon, Sep 16, 2019 at 2:35 PM Andreas Schwab wrote: > > On Sep 16 2019, Andrii Nakryiko wrote: > > > On Mon, Sep 16, 2019 at 3:59 AM Ivan Khoronzhuk > > wrote: > >> > >> echo should be replaced with echo -e to handle '\n' correctly, but > >> instead, replace it with printf as some systems can't handle echo -e. > >> > >> Signed-off-by: Ivan Khoronzhuk > >> --- > >> samples/bpf/Makefile | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile > >> index 1d9be26b4edd..f50ca852c2a8 100644 > >> --- a/samples/bpf/Makefile > >> +++ b/samples/bpf/Makefile > >> @@ -201,7 +201,7 @@ endif > >> > >> # Don't evaluate probes and warnings if we need to run make recursively > >> ifneq ($(src),) > >> -HDR_PROBE := $(shell echo "\#include \n struct list_head { int a; }; int main() { return 0; }" | \ > >> +HDR_PROBE := $(shell printf "\#include \n struct list_head { int a; }; int main() { return 0; }" | \ > > > > printf change is fine, but I'm confused about \# at the beginning of > > the string. > > From the NEWS of make 4.3: > > * WARNING: Backward-incompatibility! > Number signs (#) appearing inside a macro reference or function invocation > no longer introduce comments and should not be escaped with backslashes: > thus a call such as: > foo := $(shell echo '#') > is legal. Previously the number sign needed to be escaped, for example: > foo := $(shell echo '\#') > Now this latter will resolve to "\#". If you want to write makefiles > portable to both versions, assign the number sign to a variable: > H := \# > foo := $(shell echo '$H') > This was claimed to be fixed in 3.81, but wasn't, for some reason. > To detect this change search for 'nocomment' in the .FEATURES variable. > > Andreas. Oh, subtle... Thanks for explaining! > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different."