Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2 -18
+2 -18
scripts/mkmakefile
··· 12 12 fi 13 13 14 14 cat << EOF > Makefile 15 - # Automatically generated by $0: don't edit 16 - 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 - @: 15 + # Automatically generated by $(realpath $0): don't edit 16 + include $(realpath $1/Makefile) 33 17 EOF