From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933302AbbLHP1L (ORCPT ); Tue, 8 Dec 2015 10:27:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58968 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756150AbbLHP1K (ORCPT ); Tue, 8 Dec 2015 10:27:10 -0500 Date: Tue, 8 Dec 2015 09:27:08 -0600 From: Josh Poimboeuf To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Ingo Molnar , Namhyung Kim , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/13] perf tools: Move perf subcommand framework into lib/tools Message-ID: <20151208152708.GA14846@treble.redhat.com> References: <20151206093752.GA4022@gmail.com> <20151206155003.GA11852@krava.brq.redhat.com> <20151206200242.GM11394@treble.redhat.com> <20151207084648.GA19908@krava.brq.redhat.com> <20151208145233.GF11564@kernel.org> <20151208145531.GG11564@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151208145531.GG11564@kernel.org> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 08, 2015 at 11:55:31AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 08, 2015 at 11:52:33AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Dec 07, 2015 at 09:46:48AM +0100, Jiri Olsa escreveu: > > > On Sun, Dec 06, 2015 at 02:02:42PM -0600, Josh Poimboeuf wrote: > > > > I think the problem is that you have a stale version of the > > > > auto-generated file llvm-src-base.c. Looks like "make clean" doesn't > > > > remove it. I'll add a patch to fix it. > > > > FYI I switched back to Arnaldo's perf/core and did 'make clean && make' > > > which passed, then switched back to your change and build failed again > > > Even after his patches, it doesn't work, but I think this time he is not > > taking $(OUTPUT) into account, and as I do use "O=/tmp/build/perf/" it > > fails, trying to fix this... > > Nah, that was me not using O= for the 'make clean' call, after I do > that, it works. > > But its sad everytime we introduce the need to run 'make clean' to > regain a clean build environment :-\ Yeah, having to run 'make clean' every time you apply the patches is less than ideal. The problem is that the Build file is also a source file, since it generates the llvm-src-* files. I guess we could add the Build file itself as a dependency, like: diff --git a/tools/perf/tests/Build b/tools/perf/tests/Build index f8888e8..1869d73 100644 --- a/tools/perf/tests/Build +++ b/tools/perf/tests/Build @@ -35,21 +35,21 @@ perf-y += llvm.o llvm-src-base.o llvm-src-kbuild.o llvm-src-prologue.o perf-y += bpf.o perf-y += topology.o -$(OUTPUT)tests/llvm-src-base.c: tests/bpf-script-example.c +$(OUTPUT)tests/llvm-src-base.c: tests/bpf-script-example.c tests/Build $(call rule_mkdir) $(Q)echo '#include "tests/llvm.h"' > $@ $(Q)echo 'const char test_llvm__bpf_base_prog[] =' >> $@ $(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@ $(Q)echo ';' >> $@ -$(OUTPUT)tests/llvm-src-kbuild.c: tests/bpf-script-test-kbuild.c +$(OUTPUT)tests/llvm-src-kbuild.c: tests/bpf-script-test-kbuild.c tests/Build $(call rule_mkdir) $(Q)echo '#include "tests/llvm.h"' > $@ $(Q)echo 'const char test_llvm__bpf_test_kbuild_prog[] =' >> $@ $(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@ $(Q)echo ';' >> $@ -$(OUTPUT)tests/llvm-src-prologue.c: tests/bpf-script-test-prologue.c +$(OUTPUT)tests/llvm-src-prologue.c: tests/bpf-script-test-prologue.c tests/Build $(call rule_mkdir) $(Q)echo '#include "tests/llvm.h"' > $@ $(Q)echo 'const char test_llvm__bpf_test_prologue_prog[] =' >> $@