public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: jolsa@kernel.org, hpa@zytor.com, acme@redhat.com,
	linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl,
	namhyung@kernel.org, dsahern@gmail.com, mingo@kernel.org,
	tglx@linutronix.de
Subject: [tip:perf/core] tools build: Build fixdep helper from perf and basic libs
Date: Tue, 29 Sep 2015 01:41:09 -0700	[thread overview]
Message-ID: <tip-7c422f5572667fef0db38d2046ecce69dcf0afc8@git.kernel.org> (raw)
In-Reply-To: <1443004442-32660-8-git-send-email-jolsa@kernel.org>

Commit-ID:  7c422f5572667fef0db38d2046ecce69dcf0afc8
Gitweb:     http://git.kernel.org/tip/7c422f5572667fef0db38d2046ecce69dcf0afc8
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Wed, 23 Sep 2015 12:34:02 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 28 Sep 2015 15:50:55 -0300

tools build: Build fixdep helper from perf and basic libs

Adding the fixdep target into the Makefile.include to ease up building of
fixdep helper, that needs to be built before we dive in to the build itself.
The user can invoke the fixdep target to build the helper.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1443004442-32660-8-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/build/Documentation/Build.txt |  7 +++++++
 tools/build/Makefile.include        |  5 +++++
 tools/build/tests/ex/Makefile       |  8 +++++---
 tools/lib/api/Makefile              |  4 +++-
 tools/lib/bpf/Makefile              |  4 +++-
 tools/lib/lockdep/Makefile          |  4 +++-
 tools/perf/Makefile.perf            | 12 ++++++------
 7 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/tools/build/Documentation/Build.txt b/tools/build/Documentation/Build.txt
index 8882435..a47bffb 100644
--- a/tools/build/Documentation/Build.txt
+++ b/tools/build/Documentation/Build.txt
@@ -113,6 +113,13 @@ It defines following interface:
       make $(build)=ex
 
 
+Fixdep
+------
+It is necessary to build the fixdep helper before invoking the build.
+The Makefile.include file adds the fixdep target, that could be
+invoked by the user.
+
+
 Rules
 -----
 
diff --git a/tools/build/Makefile.include b/tools/build/Makefile.include
index 91bc606..6572bb0 100644
--- a/tools/build/Makefile.include
+++ b/tools/build/Makefile.include
@@ -1 +1,6 @@
 build := -f $(srctree)/tools/build/Makefile.build dir=. obj
+
+fixdep:
+	$(Q)$(MAKE) -C $(srctree)/tools/build fixdep
+
+.PHONY: fixdep
diff --git a/tools/build/tests/ex/Makefile b/tools/build/tests/ex/Makefile
index f279b84..c50d578 100644
--- a/tools/build/tests/ex/Makefile
+++ b/tools/build/tests/ex/Makefile
@@ -3,18 +3,20 @@ export CC      := gcc
 export LD      := ld
 export AR      := ar
 
+ex:
+
 include $(srctree)/tools/build/Makefile.include
 
 ex: ex-in.o libex-in.o
 	gcc -o $@ $^
 
-ex.%: FORCE
+ex.%: fixdep FORCE
 	make -f $(srctree)/tools/build/Makefile.build dir=. $@
 
-ex-in.o: FORCE
+ex-in.o: fixdep FORCE
 	make $(build)=ex
 
-libex-in.o: FORCE
+libex-in.o: fixdep FORCE
 	make $(build)=libex
 
 clean:
diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile
index 8806ea7..d85904d 100644
--- a/tools/lib/api/Makefile
+++ b/tools/lib/api/Makefile
@@ -23,10 +23,12 @@ RM = rm -f
 
 API_IN := $(OUTPUT)libapi-in.o
 
+all:
+
 export srctree OUTPUT CC LD CFLAGS V
 include $(srctree)/tools/build/Makefile.include
 
-all: $(LIBFILE)
+all: fixdep $(LIBFILE)
 
 $(API_IN): FORCE
 	@$(MAKE) $(build)=libapi
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index c66ade6..fc9af57 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -123,6 +123,8 @@ endif
 # the same command line setup.
 MAKEOVERRIDES=
 
+all:
+
 export srctree OUTPUT CC LD CFLAGS V
 include $(srctree)/tools/build/Makefile.include
 
@@ -133,7 +135,7 @@ CMD_TARGETS = $(LIB_FILE)
 
 TARGETS = $(CMD_TARGETS)
 
-all: $(VERSION_FILES) all_cmd
+all: fixdep $(VERSION_FILES) all_cmd
 
 all_cmd: $(CMD_TARGETS)
 
diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile
index d12081d..7e319af 100644
--- a/tools/lib/lockdep/Makefile
+++ b/tools/lib/lockdep/Makefile
@@ -93,6 +93,8 @@ else
   print_install =		echo '  INSTALL  '$1'	to	$(DESTDIR_SQ)$2';
 endif
 
+all:
+
 export srctree OUTPUT CC LD CFLAGS V
 include $(srctree)/tools/build/Makefile.include
 
@@ -109,7 +111,7 @@ CMD_TARGETS = $(LIB_FILE)
 TARGETS = $(CMD_TARGETS)
 
 
-all: all_cmd
+all: fixdep all_cmd
 
 all_cmd: $(CMD_TARGETS)
 
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 25c1753..56517d3 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -306,7 +306,7 @@ $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(LIBTRACEEVENT_DYNAMIC_LIST)
 	$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS) \
 		$(PERF_IN) $(LIBS) -o $@
 
-$(GTK_IN): FORCE
+$(GTK_IN): fixdep FORCE
 	$(Q)$(MAKE) $(build)=gtk
 
 $(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS)
@@ -349,7 +349,7 @@ endif
 __build-dir = $(subst $(OUTPUT),,$(dir $@))
 build-dir   = $(if $(__build-dir),$(__build-dir),.)
 
-prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h
+prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h fixdep
 
 $(OUTPUT)%.o: %.c prepare FORCE
 	$(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@
@@ -389,7 +389,7 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h)
 
 LIBPERF_IN := $(OUTPUT)libperf-in.o
 
-$(LIBPERF_IN): FORCE
+$(LIBPERF_IN): fixdep FORCE
 	$(Q)$(MAKE) $(build)=libperf
 
 $(LIB_FILE): $(LIBPERF_IN)
@@ -397,10 +397,10 @@ $(LIB_FILE): $(LIBPERF_IN)
 
 LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ)
 
-$(LIBTRACEEVENT): FORCE
+$(LIBTRACEEVENT): fixdep FORCE
 	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a
 
-libtraceevent_plugins: FORCE
+libtraceevent_plugins: fixdep FORCE
 	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) plugins
 
 $(LIBTRACEEVENT_DYNAMIC_LIST): libtraceevent_plugins
@@ -413,7 +413,7 @@ $(LIBTRACEEVENT)-clean:
 install-traceevent-plugins: $(LIBTRACEEVENT)
 	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins
 
-$(LIBAPI): FORCE
+$(LIBAPI): fixdep FORCE
 	$(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a
 
 $(LIBAPI)-clean:

      reply	other threads:[~2015-09-29  8:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 10:33 [PATCH 0/7] tools build: Fix header removal build issue Jiri Olsa
2015-09-23 10:33 ` [PATCH 1/7] tools build: Add Makefile.include Jiri Olsa
2015-09-29  8:38   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-09-23 10:33 ` [PATCH 2/7] tools build: Add test for missing include Jiri Olsa
2015-09-25 17:43   ` Arnaldo Carvalho de Melo
2015-09-27 19:45     ` Jiri Olsa
2015-09-29  8:39   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-09-23 10:33 ` [PATCH 3/7] tools build: Add fixdep dependency helper Jiri Olsa
2015-09-29  8:39   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-09-23 10:33 ` [PATCH 4/7] tools build: Move dependency copy into function Jiri Olsa
2015-09-29  8:40   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-09-23 10:34 ` [PATCH 5/7] tools build: Make fixdep helper part of the build process Jiri Olsa
2015-09-29  8:40   ` [tip:perf/core] tools build: Make the " tip-bot for Jiri Olsa
2015-09-23 10:34 ` [PATCH 6/7] perf tools: Rename single_dep target to prepare Jiri Olsa
2015-09-29  8:40   ` [tip:perf/core] perf tools: Rename the 'single_dep' target to ' prepare' tip-bot for Jiri Olsa
2015-09-23 10:34 ` [PATCH 7/7] tools build: Build fixdep helper from perf and basic libs Jiri Olsa
2015-09-29  8:41   ` tip-bot for Jiri Olsa [this message]

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=tip-7c422f5572667fef0db38d2046ecce69dcf0afc8@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    /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