diff mbox series

[3/4] kbuild: do not pass $(objtree) to scripts/mkmakefile

Message ID 1537260354-30082-3-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 4fd61277f66278d7ce4a77accb662d00e800cce7
Headers show
Series [1/4] kbuild: remove VERSION and PATCHLEVEL from $(objtree)/Makefile | expand

Commit Message

Masahiro Yamada Sept. 18, 2018, 8:45 a.m. UTC
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 <yamada.masahiro@socionext.com>

---

 Makefile           | 2 +-
 scripts/mkmakefile | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

-- 
2.7.4
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 6e1a059..3799bc5 100644
--- a/Makefile
+++ b/Makefile
@@ -482,7 +482,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)
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index 2435428..85995f9 100755
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -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))