From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756235AbbEFC5G (ORCPT ); Tue, 5 May 2015 22:57:06 -0400 Received: from terminus.zytor.com ([198.137.202.10]:35491 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756181AbbEFC4t (ORCPT ); Tue, 5 May 2015 22:56:49 -0400 Date: Tue, 5 May 2015 19:56:27 -0700 From: tip-bot for Jiri Olsa Message-ID: Cc: dsahern@gmail.com, a.p.zijlstra@chello.nl, tglx@linutronix.de, bp@suse.de, computersforpeace@gmail.com, linux-kernel@vger.kernel.org, namhyung@kernel.org, paulus@samba.org, jolsa@kernel.org, hpa@zytor.com, mmarek@suse.cz, sam@ravnborg.org, mingo@kernel.org, acme@redhat.com, dhowells@redhat.com Reply-To: hpa@zytor.com, jolsa@kernel.org, sam@ravnborg.org, mmarek@suse.cz, dhowells@redhat.com, acme@redhat.com, mingo@kernel.org, a.p.zijlstra@chello.nl, dsahern@gmail.com, bp@suse.de, tglx@linutronix.de, linux-kernel@vger.kernel.org, paulus@samba.org, namhyung@kernel.org, computersforpeace@gmail.com In-Reply-To: <1429389280-18720-3-git-send-email-jolsa@kernel.org> References: <1429389280-18720-3-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools build: Fix Makefile(s) to properly invoke tools build Git-Commit-ID: 16671c1e1cac2dbb995feb4bc55082fd939b5c2c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 16671c1e1cac2dbb995feb4bc55082fd939b5c2c Gitweb: http://git.kernel.org/tip/16671c1e1cac2dbb995feb4bc55082fd939b5c2c Author: Jiri Olsa AuthorDate: Sat, 18 Apr 2015 22:34:39 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 29 Apr 2015 10:37:46 -0300 tools build: Fix Makefile(s) to properly invoke tools build Several fixes were needed to allow following builds: $ make tools/tmon $ make -C tools/perf $ make -C /tools perf - some of the tools (perf) use same make variables as in kernel build, unsetting srctree and objtree - using original $(O) for O variable - perf build does not follow the descend function setup invoking it via it's own make rule I tried the rest of the tools/Makefile targets and they seem to work now. Reported-by: Brian Norris Signed-off-by: Jiri Olsa Cc: Borislav Petkov Cc: Brian Norris Cc: David Ahern Cc: David Howells Cc: Michal Marek Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Sam Ravnborg Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/1429389280-18720-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- Makefile | 5 ++--- tools/Makefile | 12 +++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index da36a3b..b1ca060 100644 --- a/Makefile +++ b/Makefile @@ -214,7 +214,6 @@ VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) export srctree objtree VPATH - # SUBARCH tells the usermode build what the underlying arch is. That is set # first, and if a usermode build is happening, the "ARCH=um" on the command # line overrides the setting of ARCH below. If a native build is happening, @@ -1504,11 +1503,11 @@ image_name: # Clear a bunch of variables before executing the submake tools/: FORCE $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ tools/%: FORCE $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ $* + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ $* # Single targets # --------------------------------------------------------------------------- diff --git a/tools/Makefile b/tools/Makefile index 01995cc..b351027 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,3 +1,8 @@ +# Some of the tools (perf) use same make variables +# as in kernel build. +export srctree= +export objtree= + include scripts/Makefile.include help: @@ -50,8 +55,13 @@ liblockdep: FORCE libapi: FORCE $(call descend,lib/api) +# The perf build does not follow the descend function setup, +# invoking it via it's own make rule. +PERF_O = $(if $(O),$(O)/tools/perf,) + perf: FORCE - $(call descend,$@) + $(Q)mkdir -p $(PERF_O) . + $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= selftests: FORCE $(call descend,testing/$@)