222-perf-build-Do-not-fail-on-missing-Build-file.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From d7a3d85e08477a979933a2bb3b525a8de99543c2 Mon Sep 17 00:00:00 2001
  2. From: Jiri Olsa <jolsa@kernel.org>
  3. Date: Fri, 29 May 2015 17:42:58 +0200
  4. Subject: [PATCH] perf build: Do not fail on missing Build file
  5. Allow nesting into directories without Build file. Currently we force
  6. include of the Build file, which fails the build when the Build file is
  7. missing.
  8. We already support empty *-in.o' objects if there's nothing in the
  9. directory to be compiled, so we can just use it for missing Build file
  10. cases.
  11. Also adding this case under tests.
  12. Reported-by: Rabin Vincent <rabin.vincent@axis.com>
  13. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
  14. Cc: David Ahern <dsahern@gmail.com>
  15. Cc: Namhyung Kim <namhyung@kernel.org>
  16. Cc: Paul Mackerras <paulus@samba.org>
  17. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
  18. Cc: Rabin Vincent <rabin.vincent@axis.com>
  19. Link: http://lkml.kernel.org/r/1432914178-24086-1-git-send-email-jolsa@kernel.org
  20. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  21. ---
  22. tools/build/Makefile.build | 2 +-
  23. tools/build/tests/ex/Build | 1 +
  24. tools/build/tests/ex/empty2/README | 2 ++
  25. 3 files changed, 4 insertions(+), 1 deletion(-)
  26. create mode 100644 tools/build/tests/ex/empty2/README
  27. --- a/tools/build/Makefile.build
  28. +++ b/tools/build/Makefile.build
  29. @@ -37,7 +37,7 @@ subdir-obj-y :=
  30. # Build definitions
  31. build-file := $(dir)/Build
  32. -include $(build-file)
  33. +-include $(build-file)
  34. quiet_cmd_flex = FLEX $@
  35. quiet_cmd_bison = BISON $@
  36. --- a/tools/build/tests/ex/Build
  37. +++ b/tools/build/tests/ex/Build
  38. @@ -2,6 +2,7 @@ ex-y += ex.o
  39. ex-y += a.o
  40. ex-y += b.o
  41. ex-y += empty/
  42. +ex-y += empty2/
  43. libex-y += c.o
  44. libex-y += d.o
  45. --- /dev/null
  46. +++ b/tools/build/tests/ex/empty2/README
  47. @@ -0,0 +1,2 @@
  48. +This directory is left intentionally without Build file
  49. +to test proper nesting into Build-less directories.