kbuild: mkmakefile: generate a simple wrapper of top Makefile
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 30 Mar 2019 12:04:16 +0000 (21:04 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 2 Apr 2019 14:27:38 +0000 (23:27 +0900)
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>
scripts/mkmakefile

index 31de468..4d0faeb 100755 (executable)
@@ -12,22 +12,6 @@ if [ "${quiet}" != "silent_" ]; then
 fi
 
 cat << EOF > Makefile
-# Automatically generated by $0: don't edit
-
-ifeq ("\$(origin V)", "command line")
-VERBOSE := \$(V)
-endif
-ifneq (\$(VERBOSE),1)
-Q := @
-endif
-
-MAKEFLAGS += --no-print-directory
-
-.PHONY: __sub-make \$(MAKECMDGOALS)
-
-__sub-make:
-       \$(Q)\$(MAKE) -C $1 O=\$(CURDIR) \$(MAKECMDGOALS)
-
-\$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make
-       @:
+# Automatically generated by $(realpath $0): don't edit
+include $(realpath $1/Makefile)
 EOF