Skip to content

Commit

Permalink
perf build: Do not fail on missing Build file
Browse files Browse the repository at this point in the history
Allow nesting into directories without Build file. Currently we force
include of the Build file, which fails the build when the Build file is
missing.

We already support empty *-in.o' objects if there's nothing in the
directory to be compiled, so we can just use it for missing Build file
cases.

Also adding this case under tests.

Reported-by: Rabin Vincent <rabin.vincent@axis.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rabin Vincent <rabin.vincent@axis.com>
Link: http://lkml.kernel.org/r/1432914178-24086-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed May 29, 2015
1 parent 9a4388c commit d7a3d85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/build/Makefile.build
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ subdir-obj-y :=

# Build definitions
build-file := $(dir)/Build
include $(build-file)
-include $(build-file)

quiet_cmd_flex = FLEX $@
quiet_cmd_bison = BISON $@
Expand Down
1 change: 1 addition & 0 deletions tools/build/tests/ex/Build
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ex-y += ex.o
ex-y += a.o
ex-y += b.o
ex-y += empty/
ex-y += empty2/

libex-y += c.o
libex-y += d.o
Expand Down
2 changes: 2 additions & 0 deletions tools/build/tests/ex/empty2/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This directory is left intentionally without Build file
to test proper nesting into Build-less directories.

0 comments on commit d7a3d85

Please sign in to comment.