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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From d7a3d85e08477a979933a2bb3b525a8de99543c2 Mon Sep 17 00:00:00 2001
  2. From: Jiri Olsa <[email protected]>
  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 <[email protected]>
  13. Signed-off-by: Jiri Olsa <[email protected]>
  14. Cc: David Ahern <[email protected]>
  15. Cc: Namhyung Kim <[email protected]>
  16. Cc: Paul Mackerras <[email protected]>
  17. Cc: Peter Zijlstra <[email protected]>
  18. Cc: Rabin Vincent <[email protected]>
  19. Link: http://lkml.kernel.org/r/[email protected]
  20. Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  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. diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
  28. index 10df572..69c35cf 100644
  29. --- a/tools/build/Makefile.build
  30. +++ b/tools/build/Makefile.build
  31. @@ -37,7 +37,7 @@ subdir-obj-y :=
  32. # Build definitions
  33. build-file := $(dir)/Build
  34. -include $(build-file)
  35. +-include $(build-file)
  36. quiet_cmd_flex = FLEX $@
  37. quiet_cmd_bison = BISON $@
  38. diff --git a/tools/build/tests/ex/Build b/tools/build/tests/ex/Build
  39. index 0e6c3e6..70d8762 100644
  40. --- a/tools/build/tests/ex/Build
  41. +++ b/tools/build/tests/ex/Build
  42. @@ -2,6 +2,7 @@ ex-y += ex.o
  43. ex-y += a.o
  44. ex-y += b.o
  45. ex-y += empty/
  46. +ex-y += empty2/
  47. libex-y += c.o
  48. libex-y += d.o
  49. diff --git a/tools/build/tests/ex/empty2/README b/tools/build/tests/ex/empty2/README
  50. new file mode 100644
  51. index 0000000..2107cc5
  52. --- /dev/null
  53. +++ b/tools/build/tests/ex/empty2/README
  54. @@ -0,0 +1,2 @@
  55. +This directory is left intentionally without Build file
  56. +to test proper nesting into Build-less directories.
  57. --
  58. 2.1.4