From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754398AbbE1VQI (ORCPT ); Thu, 28 May 2015 17:16:08 -0400 Received: from mga03.intel.com ([134.134.136.65]:23667 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932154AbbE1VP6 (ORCPT ); Thu, 28 May 2015 17:15:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,514,1427785200"; d="scan'208";a="578443516" Date: Thu, 28 May 2015 14:15:57 -0700 From: Andi Kleen To: Sukadev Bhattiprolu Cc: Andi Kleen , jolsa@redhat.com, mingo@kernel.org, acme@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] perf, tools: Fix jevents dependencies Message-ID: <20150528211557.GR7484@tassilo.jf.intel.com> References: <1432844402-11649-1-git-send-email-andi@firstfloor.org> <1432844402-11649-4-git-send-email-andi@firstfloor.org> <20150528205716.GA11221@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150528205716.GA11221@us.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 28, 2015 at 01:57:16PM -0700, Sukadev Bhattiprolu wrote: > Andi Kleen [andi@firstfloor.org] wrote: > | From: Andi Kleen > | > | The "find" based dependencies for the JSON files didn't work me. I > | didn't get a rebuild when the JSON files changed. > > Hmm, it works for me every time. I like the 'find' better because it > is more compact and allows mulitple levels. You're right. On rechecking it seems to work. Perhaps was some other problem earlier. So the patch can be dropped. > > | Change it to > | use wildcard. Also add a dependency for the jevents binary itself > | and for the mapfile. > > I was trying this to address Jiri's comment about being silent if > some architectures don't have JSON files (and based on your comments > above, added the depedency for mapfile and jevents) Ok. > > diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build > index 7e0c85c..45b05a7 100644 > --- a/tools/perf/pmu-events/Build > +++ b/tools/perf/pmu-events/Build > @@ -1,10 +1,12 @@ > jevents-y += json.o jsmn.o jevents.o > pmu-events-y += pmu-events.o > -JSON = $(shell find pmu-events/arch/$(ARCH) -name '*.json') > - > +EVDIR = pmu-events/arch/$(ARCH) > +JSON = $(shell [ -d $(EVDIR) ] && \ > + find $(EVDIR) -name '*.json' -o -name 'mapfile*') BTW should only process a single mapfile called mapfile.csv Currently it processes editor backup files and similar too, which is not really intended. -Andi