Skip to contentSkip to conversation

perf build: Do not fail on missing Build file

PATCH Applied Jiri Olsa 3 participants 3 messages May 29, 2015

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

PATCH 1/1 perf build: Do not fail on missing Build file

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.

---
 tools/build/Makefile.build         | 2 +-
 tools/build/tests/ex/Build         | 1 +
 tools/build/tests/ex/empty2/README | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 tools/build/tests/ex/empty2/README
tools/build/Makefile.build +1 -1
index 10df57237a66..69c35cf09cad 100644
@@ -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    $@
tools/build/tests/ex/Build +1 -0
index 0e6c3e6767e6..70d876237c57 100644
@@ -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
tools/build/tests/ex/empty2/README new file +2 -0
new file mode 100644
index 000000000000..2107cc5bf5a9
@@ -0,0 +1,2 @@
+This directory is left intentionally without Build file
+to test proper nesting into Build-less directories.
Signature · 1 line
1.9.3
#1 lore raw

Em Fri, May 29, 2015 at 05:42:58PM +0200, Jiri Olsa escreveu:

Quoted 9 lines

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.

Thanks, applied.

- Arnaldo

#2 lore raw
In reply to Jiri Olsa
perf build: Do not fail on missing Build file
Commit-ID:  d7a3d85e08477a979933a2bb3b525a8de99543c2
Gitweb:     http://git.kernel.org/tip/d7a3d85e08477a979933a2bb3b525a8de99543c2
Author:     Jiri Olsa <[email protected]>
AuthorDate: Fri, 29 May 2015 17:42:58 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 29 May 2015 12:44:25 -0300

perf build: Do not fail on missing Build file

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.

---
 tools/build/Makefile.build         | 2 +-
 tools/build/tests/ex/Build         | 1 +
 tools/build/tests/ex/empty2/README | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
tools/build/Makefile.build +1 -1
index 10df572..69c35cf 100644
@@ -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    $@
tools/build/tests/ex/Build +1 -0
index 0e6c3e6..70d8762 100644
@@ -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
tools/build/tests/ex/empty2/README new file +2 -0
new file mode 100644
index 0000000..2107cc5
@@ -0,0 +1,2 @@
+This directory is left intentionally without Build file
+to test proper nesting into Build-less directories.