010-perf-tools-Create-config.detected-into-OUTPUT-direct.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From: Aaro Koskinen <aaro.koskinen@nokia.com>
  2. Date: Wed, 1 Jul 2015 14:54:42 +0300
  3. Subject: [PATCH] perf tools: Create config.detected into OUTPUT directory
  4. Create config.detected into OUTPUT directory instead of source
  5. directory.
  6. This fixes parallel builds that share the same source directory.
  7. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
  8. Acked-by: Jiri Olsa <jolsa@kernel.org>
  9. Cc: Paul Mackerras <paulus@samba.org>
  10. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
  11. Link: http://lkml.kernel.org/r/1435751683-18500-1-git-send-email-aaro.koskinen@nokia.com
  12. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  13. ---
  14. --- a/tools/build/Makefile.build
  15. +++ b/tools/build/Makefile.build
  16. @@ -25,7 +25,7 @@ build-dir := $(srctree)/tools/build
  17. include $(build-dir)/Build.include
  18. # do not force detected configuration
  19. --include .config-detected
  20. +-include $(OUTPUT).config-detected
  21. # Init all relevant variables used in build files so
  22. # 1) they have correct type
  23. --- a/tools/perf/Makefile.perf
  24. +++ b/tools/perf/Makefile.perf
  25. @@ -528,7 +528,7 @@ config-clean:
  26. clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean config-clean
  27. $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS)
  28. $(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
  29. - $(Q)$(RM) .config-detected
  30. + $(Q)$(RM) $(OUTPUT).config-detected
  31. $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
  32. $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex*
  33. $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
  34. --- a/tools/perf/config/Makefile
  35. +++ b/tools/perf/config/Makefile
  36. @@ -11,9 +11,9 @@ ifneq ($(obj-perf),)
  37. obj-perf := $(abspath $(obj-perf))/
  38. endif
  39. -$(shell echo -n > .config-detected)
  40. -detected = $(shell echo "$(1)=y" >> .config-detected)
  41. -detected_var = $(shell echo "$(1)=$($(1))" >> .config-detected)
  42. +$(shell echo -n > $(OUTPUT).config-detected)
  43. +detected = $(shell echo "$(1)=y" >> $(OUTPUT).config-detected)
  44. +detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected)
  45. CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)