From e07cf4fd7d72546bf46279927b28fe9d74308868 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 30 Mar 2019 21:04:15 +0900 Subject: kbuild: mkmakefile: do not check the generated Makefile marker This hunk was added to avoid accidental overwrite of the top Makefile in case O= points to the top of the source tree. As commit 4f1127e20437 ("kbuild: fix infinite make recursion"), it caused some troubles in the past because Kbuild assumes O= as out-of-tree build, while it actually works in the source tree. Now this works more properly; if O= points to the source directory, it is handled as in-tree build. So, this sanity check is unneeded. Signed-off-by: Masahiro Yamada --- scripts/mkmakefile | 6 ------ 1 file changed, 6 deletions(-) (limited to 'scripts/mkmakefile') diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 412f13fdff52..31de46801321 100755 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile @@ -7,12 +7,6 @@ # Usage # $1 - Kernel src directory -# Only overwrite automatically generated Makefiles -# (so we do not overwrite kernel Makefile) -if test -e Makefile && ! grep -q Automatically Makefile -then - exit 0 -fi if [ "${quiet}" != "silent_" ]; then echo " GEN Makefile" fi -- cgit v1.2.3 From 48b5ffd1268788afb01525e71e864e901e9aa070 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 30 Mar 2019 21:04:16 +0900 Subject: 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 Reviewed-by: Kieran Bingham --- scripts/mkmakefile | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'scripts/mkmakefile') 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 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 -- cgit v1.2.3