From patchwork Mon Jan 11 13:47:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wangnan (F)" X-Patchwork-Id: 565853 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C9A791402BF for ; Tue, 12 Jan 2016 01:00:12 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933127AbcAKN7S (ORCPT ); Mon, 11 Jan 2016 08:59:18 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:41400 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760047AbcAKNts (ORCPT ); Mon, 11 Jan 2016 08:49:48 -0500 Received: from 172.24.1.48 (EHLO szxeml422-hub.china.huawei.com) ([172.24.1.48]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BUI71787; Mon, 11 Jan 2016 21:49:05 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by szxeml422-hub.china.huawei.com (10.82.67.152) with Microsoft SMTP Server id 14.3.235.1; Mon, 11 Jan 2016 21:48:55 +0800 From: Wang Nan To: CC: , , , , , Wang Nan , "Naveen N. Rao" , Sukadev Bhattiprolu Subject: [PATCH 07/53] tools: Move Makefile.arch from perf/config to tools/scripts Date: Mon, 11 Jan 2016 13:47:58 +0000 Message-ID: <1452520124-2073-8-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1452520124-2073-1-git-send-email-wangnan0@huawei.com> References: <1452520124-2073-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.5693B2D3.00A6, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: f52f6e921d7820f4c0397f64222655d6 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org After this patch other directories can use this architecture detector without directly including it from perf's directory. Libbpf would utilize it to get proper $(ARCH) so it can receive correct uapi include directory. Signed-off-by: Wang Nan Signed-off-by: Arnaldo Carvalho de Melo [Add missing srctree definition in tests/make] Acked-by: Jiri Olsa Tested-by: Naveen N. Rao Cc: Naveen N. Rao Cc: Sukadev Bhattiprolu --- tools/perf/config/Makefile | 2 +- tools/perf/tests/make | 16 +++++++++++++++- tools/{perf/config => scripts}/Makefile.arch | 0 3 files changed, 16 insertions(+), 2 deletions(-) rename tools/{perf/config => scripts}/Makefile.arch (100%) diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 0793c76..7545ba60 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -17,7 +17,7 @@ detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected) CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS) -include $(src-perf)/config/Makefile.arch +include $(srctree)/tools/scripts/Makefile.arch $(call detected_var,ARCH) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index 0f5afcb..1e59ce8 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -1,3 +1,5 @@ +include ../scripts/Makefile.include + ifndef MK ifeq ($(MAKECMDGOALS),) # no target specified, trigger the whole suite @@ -31,7 +33,19 @@ ifeq ($(SET_PARALLEL),1) PARALLEL_OPT="-j$(cores)" endif -include config/Makefile.arch +# As per kernel Makefile, avoid funny character set dependencies +unexport LC_ALL +LC_COLLATE=C +LC_NUMERIC=C +export LC_COLLATE LC_NUMERIC + +ifeq ($(srctree),) +srctree := $(patsubst %/,%,$(dir $(shell pwd))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +#$(info Determined 'srctree' to be $(srctree)) +endif + +include $(srctree)/tools/scripts/Makefile.arch # FIXME looks like x86 is the only arch running tests ;-) # we need some IS_(32/64) flag to make this generic diff --git a/tools/perf/config/Makefile.arch b/tools/scripts/Makefile.arch similarity index 100% rename from tools/perf/config/Makefile.arch rename to tools/scripts/Makefile.arch