diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-03-30 08:04:16 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-04-02 10:27:38 -0400 |
commit | 48b5ffd1268788afb01525e71e864e901e9aa070 (patch) | |
tree | 44e99835658a0520c97c565afefbbe24d5c91539 /scripts | |
parent | e07cf4fd7d72546bf46279927b28fe9d74308868 (diff) |
kbuild: mkmakefile: generate a simple wrapper of top Makefile
Now that Kbuild is able to start from any directory, the generated
Makefile can simply wrap the top Makefile.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Kieran Bingham <kbingham@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mkmakefile | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 31de46801321..4d0faebb1719 100755 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile | |||
@@ -12,22 +12,6 @@ if [ "${quiet}" != "silent_" ]; then | |||
12 | fi | 12 | fi |
13 | 13 | ||
14 | cat << EOF > Makefile | 14 | cat << EOF > Makefile |
15 | # Automatically generated by $0: don't edit | 15 | # Automatically generated by $(realpath $0): don't edit |
16 | 16 | include $(realpath $1/Makefile) | |
17 | ifeq ("\$(origin V)", "command line") | ||
18 | VERBOSE := \$(V) | ||
19 | endif | ||
20 | ifneq (\$(VERBOSE),1) | ||
21 | Q := @ | ||
22 | endif | ||
23 | |||
24 | MAKEFLAGS += --no-print-directory | ||
25 | |||
26 | .PHONY: __sub-make \$(MAKECMDGOALS) | ||
27 | |||
28 | __sub-make: | ||
29 | \$(Q)\$(MAKE) -C $1 O=\$(CURDIR) \$(MAKECMDGOALS) | ||
30 | |||
31 | \$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make | ||
32 | @: | ||
33 | EOF | 17 | EOF |