From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756724AbcBIMNl (ORCPT ); Tue, 9 Feb 2016 07:13:41 -0500 Received: from terminus.zytor.com ([198.137.202.10]:35764 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755198AbcBIMNj (ORCPT ); Tue, 9 Feb 2016 07:13:39 -0500 Date: Tue, 9 Feb 2016 04:13:24 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: linux-kernel@vger.kernel.org, acme@redhat.com, hpa@zytor.com, tglx@linutronix.de, jolsa@redhat.com, wangnan0@huawei.com, mingo@kernel.org Reply-To: acme@redhat.com, mingo@kernel.org, jolsa@redhat.com, wangnan0@huawei.com, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Fix parallel build including 'clean' target Git-Commit-ID: 3e2751d9169563486c2bfe7382726f1315cb156b 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: 3e2751d9169563486c2bfe7382726f1315cb156b Gitweb: http://git.kernel.org/tip/3e2751d9169563486c2bfe7382726f1315cb156b Author: Jiri Olsa AuthorDate: Thu, 4 Feb 2016 12:30:36 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 4 Feb 2016 15:53:16 -0300 perf tools: Fix parallel build including 'clean' target Do not parallelize 'clean' with other targets, figure out if it is present and do it first, then the other targets. Noticed with: tools/perf> make -j24 clean all LD arch/libperf-in.o LD plugin_xen-in.o arch//libperf-in.o: file not recognized: File truncated make[3]: *** [arch/libperf-in.o] Error 1 make[2]: *** [arch] Error 2 make[2]: *** Waiting for unfinished jobs.... AR libapi.a Reported-and-Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Acked-by: Wang Nan Link: http://lkml.kernel.org/n/tip-kb0qs29zbz7hxn32mc5zbsoz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 4b68f46..67837c6 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -68,6 +68,20 @@ all tags TAGS: $(print_msg) $(make) +ifdef MAKECMDGOALS +has_clean := 0 +ifneq ($(filter clean,$(MAKECMDGOALS)),) + has_clean := 1 +endif # clean + +ifeq ($(has_clean),1) + rest := $(filter-out clean,$(MAKECMDGOALS)) + ifneq ($(rest),) +$(rest): clean + endif # rest +endif # has_clean +endif # MAKECMDGOALS + # # The clean target is not really parallel, don't print the jobs info: #