Skip to content

Commit

Permalink
kbuild: mkmakefile: generate a simple wrapper of top Makefile
Browse files Browse the repository at this point in the history
Now that Kbuild is able to start from any directory, the generated
Makefile can simply wrap the top Makefile.

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
  • Loading branch information
masahir0y committed Apr 2, 2019
1 parent e07cf4f commit 48b5ffd
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions scripts/mkmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 48b5ffd

Please sign in to comment.