mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
kbuild: reuse this-makefile to define abs_srctree
Move this-makefile up, and reuse it to define abs_srctree. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
5
Makefile
5
Makefile
@@ -145,7 +145,8 @@ else
|
|||||||
need-sub-make := 1
|
need-sub-make := 1
|
||||||
endif
|
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)
|
ifneq ($(words $(subst :, ,$(abs_srctree))), 1)
|
||||||
$(error source directory cannot contain spaces or colons)
|
$(error source directory cannot contain spaces or colons)
|
||||||
@@ -160,8 +161,6 @@ MAKEFLAGS += --include-dir=$(abs_srctree)
|
|||||||
need-sub-make := 1
|
need-sub-make := 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
this-makefile := $(lastword $(MAKEFILE_LIST))
|
|
||||||
|
|
||||||
ifneq ($(filter 3.%,$(MAKE_VERSION)),)
|
ifneq ($(filter 3.%,$(MAKE_VERSION)),)
|
||||||
# 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x
|
# '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.
|
# We need to invoke sub-make to avoid implicit rules in the top Makefile.
|
||||||
|
Reference in New Issue
Block a user