From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752731AbdEPX1v (ORCPT ); Tue, 16 May 2017 19:27:51 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34922 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752248AbdEPX1q (ORCPT ); Tue, 16 May 2017 19:27:46 -0400 Subject: Re: [PATCH v1] samples/bpf: Add a .gitignore for binaries To: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= , David Ahern , Alexei Starovoitov , Daniel Borkmann Cc: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Wang Nan , netdev@vger.kernel.org References: <20170212212356.11675-1-mic@digikod.net> <8277c7cc-8f44-40ec-1f7e-53c404d84292@cumulusnetworks.com> From: David Ahern Message-ID: Date: Tue, 16 May 2017 16:27:36 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/13/17 3:30 AM, Mickaël Salaün wrote: > > On 13/02/2017 02:43, David Ahern wrote: >> On 2/12/17 2:23 PM, Mickaël Salaün wrote: >>> diff --git a/samples/bpf/.gitignore b/samples/bpf/.gitignore >>> new file mode 100644 >>> index 000000000000..a7562a5ef4c2 >>> --- /dev/null >>> +++ b/samples/bpf/.gitignore >>> @@ -0,0 +1,32 @@ >>> +fds_example >>> +lathist >> >> ... >> >> Listing each target is going to be a PITA to maintain. It would be >> better to put targets into a build directory (bin?) and ignore the >> directory. >> > > It would require a lot of modifications to the Makefile and more > complexity. It seems much more simple for everyone to stick to a simple > gitignore file easily maintainable: > $ awk '$1 == "hostprogs-y" { print $3 }' < Makefile > .gitignore > > Alexei, Daniel, what do you think about this? Do you want me to send a > v2 with the new tests? > The problem stems from the fact that bpf samples do not really fall into the 'hostprogs' category (see "4 Host Program support" in Documentation/kbuild/makefiles.txt). Fixing samples/bpf to not rely on it is the better long term solution. Building of tools/ for example does not rely on it so there is an existing example of leveraging kernel headers without the overhead.