Skip to content

Commit

Permalink
kbuild: do not pass $(objtree) to scripts/mkmakefile
Browse files Browse the repository at this point in the history
Since $(objtree) is always '.', it is not useful to pass it to
scripts/mkmakefile.  I assume nobody wants to run this script directly.

Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
masahir0y committed Oct 4, 2018
1 parent 74bc0c0 commit 4fd6127
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ PHONY += outputmakefile
outputmakefile:
ifneq ($(KBUILD_SRC),)
$(Q)ln -fsn $(srctree) source
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) $(objtree)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
endif

ifeq ($(cc-name),clang)
Expand Down
7 changes: 3 additions & 4 deletions scripts/mkmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@

# Usage
# $1 - Kernel src directory
# $2 - Output directory

# Only overwrite automatically generated Makefiles
# (so we do not overwrite kernel Makefile)
if test -e $2/Makefile && ! grep -q Automatically $2/Makefile
if test -e Makefile && ! grep -q Automatically Makefile
then
exit 0
fi
if [ "${quiet}" != "silent_" ]; then
echo " GEN $2/Makefile"
echo " GEN Makefile"
fi

cat << EOF > $2/Makefile
cat << EOF > Makefile
# Automatically generated by $0: don't edit
lastword = \$(word \$(words \$(1)),\$(1))
Expand Down

0 comments on commit 4fd6127

Please sign in to comment.