From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 11/19] perf tools: Fix parallel build including 'clean' target
Date: Fri, 5 Feb 2016 13:26:02 -0300 [thread overview]
Message-ID: <1454689570-12912-12-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1454689570-12912-1-git-send-email-acme@kernel.org>
From: Jiri Olsa <jolsa@redhat.com>
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 <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-kb0qs29zbz7hxn32mc5zbsoz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 4b68f465195c..67837c6cdbd8 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:
#
--
2.5.0
next prev parent reply other threads:[~2016-02-05 16:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 16:25 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 01/19] perf build tests: Elide "-f Makefile" from make invokation Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 02/19] perf build tests: Move the feature related vars to the front of the make cmdline Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 03/19] perf config: Document 'ui.show-headers' variable in man page Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 04/19] perf config: Document variables for 'call-graph' section " Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 05/19] perf config: Document variables for 'report' " Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 06/19] perf config: Document 'top.children' variable " Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 07/19] perf config: Document 'man.viewer' " Arnaldo Carvalho de Melo
2016-02-05 16:25 ` [PATCH 08/19] perf config: Document 'pager.<subcommand>' variables " Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 09/19] perf config: Document 'kmem.default' variable " Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 10/19] perf config: Document 'record.build-id' " Arnaldo Carvalho de Melo
2016-02-05 16:26 ` Arnaldo Carvalho de Melo [this message]
2016-02-05 16:26 ` [PATCH 12/19] perf build tests: Do parallell builds with 'build-test' Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 13/19] perf tools: handle spaces in file names obtained from /proc/pid/maps Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 14/19] perf symbols: add Java demangling support Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 15/19] perf build: Add libcrypto feature detection Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 16/19] perf inject: Make sure mmap records are ordered when injecting build_ids Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 17/19] perf inject: Add jitdump mmap injection support Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 18/19] perf tools: add JVMTI agent library Arnaldo Carvalho de Melo
2016-02-05 16:26 ` [PATCH 19/19] perf jit: add source line info support Arnaldo Carvalho de Melo
2016-02-09 9:40 ` [GIT PULL 00/19] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454689570-12912-12-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).