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
6 Allow nesting into directories without Build file. Currently we force
7 include of the Build file, which fails the build when the Build file is
10 We already support empty *-in.o' objects if there's nothing in the
11 directory to be compiled, so we can just use it for missing Build file
14 Also adding this case under tests.
16 Reported-by: Rabin Vincent <rabin.vincent@axis.com>
17 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
18 Cc: David Ahern <dsahern@gmail.com>
19 Cc: Namhyung Kim <namhyung@kernel.org>
20 Cc: Paul Mackerras <paulus@samba.org>
21 Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
22 Cc: Rabin Vincent <rabin.vincent@axis.com>
23 Link: http://lkml.kernel.org/r/1432914178-24086-1-git-send-email-jolsa@kernel.org
24 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
26 tools/build/Makefile.build | 2 +-
27 tools/build/tests/ex/Build | 1 +
28 tools/build/tests/ex/empty2/README | 2 ++
29 3 files changed, 4 insertions(+), 1 deletion(-)
30 create mode 100644 tools/build/tests/ex/empty2/README
32 diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
33 index 10df572..69c35cf 100644
34 --- a/tools/build/Makefile.build
35 +++ b/tools/build/Makefile.build
36 @@ -37,7 +37,7 @@ subdir-obj-y :=
39 build-file := $(dir)/Build
40 -include $(build-file)
41 +-include $(build-file)
43 quiet_cmd_flex = FLEX $@
44 quiet_cmd_bison = BISON $@
45 diff --git a/tools/build/tests/ex/Build b/tools/build/tests/ex/Build
46 index 0e6c3e6..70d8762 100644
47 --- a/tools/build/tests/ex/Build
48 +++ b/tools/build/tests/ex/Build
49 @@ -2,6 +2,7 @@ ex-y += ex.o
57 diff --git a/tools/build/tests/ex/empty2/README b/tools/build/tests/ex/empty2/README
59 index 0000000..2107cc5
61 +++ b/tools/build/tests/ex/empty2/README
63 +This directory is left intentionally without Build file
64 +to test proper nesting into Build-less directories.