Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiri Olsa and committed by
Arnaldo Carvalho de Melo
7c422f55 324c824a

+32 -12
+7
tools/build/Documentation/Build.txt
··· 113 113 make $(build)=ex 114 114 115 115 116 + Fixdep 117 + ------ 118 + It is necessary to build the fixdep helper before invoking the build. 119 + The Makefile.include file adds the fixdep target, that could be 120 + invoked by the user. 121 + 122 + 116 123 Rules 117 124 ----- 118 125
+5
tools/build/Makefile.include
··· 1 1 build := -f $(srctree)/tools/build/Makefile.build dir=. obj 2 + 3 + fixdep: 4 + $(Q)$(MAKE) -C $(srctree)/tools/build fixdep 5 + 6 + .PHONY: fixdep
+5 -3
tools/build/tests/ex/Makefile
··· 3 3 export LD := ld 4 4 export AR := ar 5 5 6 + ex: 7 + 6 8 include $(srctree)/tools/build/Makefile.include 7 9 8 10 ex: ex-in.o libex-in.o 9 11 gcc -o $@ $^ 10 12 11 - ex.%: FORCE 13 + ex.%: fixdep FORCE 12 14 make -f $(srctree)/tools/build/Makefile.build dir=. $@ 13 15 14 - ex-in.o: FORCE 16 + ex-in.o: fixdep FORCE 15 17 make $(build)=ex 16 18 17 - libex-in.o: FORCE 19 + libex-in.o: fixdep FORCE 18 20 make $(build)=libex 19 21 20 22 clean:
+3 -1
tools/lib/api/Makefile
··· 23 23 24 24 API_IN := $(OUTPUT)libapi-in.o 25 25 26 + all: 27 + 26 28 export srctree OUTPUT CC LD CFLAGS V 27 29 include $(srctree)/tools/build/Makefile.include 28 30 29 - all: $(LIBFILE) 31 + all: fixdep $(LIBFILE) 30 32 31 33 $(API_IN): FORCE 32 34 @$(MAKE) $(build)=libapi
+3 -1
tools/lib/bpf/Makefile
··· 123 123 # the same command line setup. 124 124 MAKEOVERRIDES= 125 125 126 + all: 127 + 126 128 export srctree OUTPUT CC LD CFLAGS V 127 129 include $(srctree)/tools/build/Makefile.include 128 130 ··· 135 133 136 134 TARGETS = $(CMD_TARGETS) 137 135 138 - all: $(VERSION_FILES) all_cmd 136 + all: fixdep $(VERSION_FILES) all_cmd 139 137 140 138 all_cmd: $(CMD_TARGETS) 141 139
+3 -1
tools/lib/lockdep/Makefile
··· 93 93 print_install = echo ' INSTALL '$1' to $(DESTDIR_SQ)$2'; 94 94 endif 95 95 96 + all: 97 + 96 98 export srctree OUTPUT CC LD CFLAGS V 97 99 include $(srctree)/tools/build/Makefile.include 98 100 ··· 111 109 TARGETS = $(CMD_TARGETS) 112 110 113 111 114 - all: all_cmd 112 + all: fixdep all_cmd 115 113 116 114 all_cmd: $(CMD_TARGETS) 117 115
+6 -6
tools/perf/Makefile.perf
··· 306 306 $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS) \ 307 307 $(PERF_IN) $(LIBS) -o $@ 308 308 309 - $(GTK_IN): FORCE 309 + $(GTK_IN): fixdep FORCE 310 310 $(Q)$(MAKE) $(build)=gtk 311 311 312 312 $(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS) ··· 349 349 __build-dir = $(subst $(OUTPUT),,$(dir $@)) 350 350 build-dir = $(if $(__build-dir),$(__build-dir),.) 351 351 352 - prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h 352 + prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h fixdep 353 353 354 354 $(OUTPUT)%.o: %.c prepare FORCE 355 355 $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ ··· 389 389 390 390 LIBPERF_IN := $(OUTPUT)libperf-in.o 391 391 392 - $(LIBPERF_IN): FORCE 392 + $(LIBPERF_IN): fixdep FORCE 393 393 $(Q)$(MAKE) $(build)=libperf 394 394 395 395 $(LIB_FILE): $(LIBPERF_IN) ··· 397 397 398 398 LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) 399 399 400 - $(LIBTRACEEVENT): FORCE 400 + $(LIBTRACEEVENT): fixdep FORCE 401 401 $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a 402 402 403 - libtraceevent_plugins: FORCE 403 + libtraceevent_plugins: fixdep FORCE 404 404 $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) plugins 405 405 406 406 $(LIBTRACEEVENT_DYNAMIC_LIST): libtraceevent_plugins ··· 413 413 install-traceevent-plugins: $(LIBTRACEEVENT) 414 414 $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins 415 415 416 - $(LIBAPI): FORCE 416 + $(LIBAPI): fixdep FORCE 417 417 $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a 418 418 419 419 $(LIBAPI)-clean: