VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Masahiro Yamada <masahiroy@kernel.org> 2021-02-22 01:50:19 +0900 committer: Masahiro Yamada <masahiroy@kernel.org> 2021-02-24 15:12:06 +0900 commit: 30cef68d2d19e48c5832b126d3f4a7aeae5a64d6 parent: f91e46b1a722082a5eabcd230d0dfcc6cff3c384
Commit Summary:
kbuild: reuse this-makefile to define abs_srctree
Diffstat:
1 file changed, 2 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4dafeae67f54..667602a74a05 100644
--- a/Makefile
+++ b/Makefile
@@ -145,7 +145,8 @@ else
 need-sub-make := 1
 endif
 
-abs_srctree := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
+this-makefile := $(lastword $(MAKEFILE_LIST))
+abs_srctree := $(realpath $(dir $(this-makefile)))
 
 ifneq ($(words $(subst :, ,$(abs_srctree))), 1)
 $(error source directory cannot contain spaces or colons)
@@ -160,8 +161,6 @@ MAKEFLAGS += --include-dir=$(abs_srctree)
 need-sub-make := 1
 endif
 
-this-makefile := $(lastword $(MAKEFILE_LIST))
-
 ifneq ($(filter 3.%,$(MAKE_VERSION)),)
 # 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x
 # We need to invoke sub-make to avoid implicit rules in the top Makefile.