From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755223AbbBRSb6 (ORCPT ); Wed, 18 Feb 2015 13:31:58 -0500 Received: from terminus.zytor.com ([198.137.202.10]:41040 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752395AbbBRSb4 (ORCPT ); Wed, 18 Feb 2015 13:31:56 -0500 Date: Wed, 18 Feb 2015 10:31:07 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: linux-kernel@vger.kernel.org, cjashfor@linux.vnet.ibm.com, fweisbec@gmail.com, dsahern@gmail.com, acme@redhat.com, jolsa@kernel.org, namhyung@kernel.org, eranian@google.com, bp@alien8.de, paulus@samba.org, will.deacon@arm.com, mingo@kernel.org, alexis.berlemont@gmail.com, sukadev@linux.vnet.ibm.com, tglx@linutronix.de, hpa@zytor.com, peterz@infradead.org Reply-To: linux-kernel@vger.kernel.org, cjashfor@linux.vnet.ibm.com, fweisbec@gmail.com, dsahern@gmail.com, acme@redhat.com, jolsa@kernel.org, namhyung@kernel.org, bp@alien8.de, eranian@google.com, paulus@samba.org, will.deacon@arm.com, mingo@kernel.org, alexis.berlemont@gmail.com, sukadev@linux.vnet.ibm.com, tglx@linutronix.de, hpa@zytor.com, peterz@infradead.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools build: Add detected config support Git-Commit-ID: fcfd6611fbccdbf2593bd949097a5c0e45cd96da 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: fcfd6611fbccdbf2593bd949097a5c0e45cd96da Gitweb: http://git.kernel.org/tip/fcfd6611fbccdbf2593bd949097a5c0e45cd96da Author: Jiri Olsa AuthorDate: Wed, 31 Dec 2014 17:37:00 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 12 Feb 2015 11:16:56 -0300 tools build: Add detected config support Adding support to include detected configuration makefile into the build process. This will allow the Build objects to be configurable based on the config data, like: perf-$(CONFIG_KRAVA) += krava.o The configuration is stored in '.config-detected' file, which is generated for each compilation. Signed-off-by: Jiri Olsa Tested-by: Sukadev Bhattiprolu Tested-by: Will Deacon Cc: Alexis Berlemont Cc: Borislav Petkov Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-bl8qho0ubck7aqrbbfu9inlm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/build/Makefile.build | 3 +++ tools/perf/config/Makefile | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build index ae203f2..35174d9 100644 --- a/tools/build/Makefile.build +++ b/tools/build/Makefile.build @@ -22,6 +22,9 @@ build-dir := $(srctree)/tools/build # Generic definitions include $(build-dir)/Build.include +# do not force detected configuration +-include .config-detected + # Init all relevant variables used in build files so # 1) they have correct type # 2) they do not inherit any value from the environment diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index cc22408..ba41421 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -11,6 +11,10 @@ ifneq ($(obj-perf),) obj-perf := $(abspath $(obj-perf))/ endif +$(shell echo -n > .config-detected) +detected = $(shell echo "$(1)=y" >> .config-detected) +detected_var = $(shell echo "$(1)=$($(1))" >> .config-detected) + LIB_INCLUDE := $(srctree)/tools/lib/ CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)