提交 2a691470 编写于 作者: S Sam Ravnborg

kbuild: fix make O=...

kbuild failed to locate Kbuild.include.
Teach kbuild how to find Kbuild files when using make O=...
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
---
上级 8ec4b4ff
...@@ -310,7 +310,7 @@ cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \ ...@@ -310,7 +310,7 @@ cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
MAKEFLAGS += --include-dir=$(srctree) MAKEFLAGS += --include-dir=$(srctree)
# We need some generic definitions # We need some generic definitions
include scripts/Kbuild.include include $(srctree)/scripts/Kbuild.include
# For maximum performance (+ possibly random breakage, uncomment # For maximum performance (+ possibly random breakage, uncomment
# the following) # the following)
......
...@@ -10,7 +10,9 @@ __build: ...@@ -10,7 +10,9 @@ __build:
# Read .config if it exist, otherwise ignore # Read .config if it exist, otherwise ignore
-include .config -include .config
include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile) # The filename Kbuild has precedence over Makefile
include $(if $(wildcard $(srctree)/$(src)/Kbuild), \
$(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile)
include scripts/Kbuild.include include scripts/Kbuild.include
include scripts/Makefile.lib include scripts/Makefile.lib
......
...@@ -7,7 +7,9 @@ src := $(obj) ...@@ -7,7 +7,9 @@ src := $(obj)
.PHONY: __clean .PHONY: __clean
__clean: __clean:
include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile) # The filename Kbuild has precedence over Makefile
include $(if $(wildcard $(srctree)/$(src)/Kbuild), \
$(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile)
# Figure out what we need to build from the various variables # Figure out what we need to build from the various variables
# ========================================================================== # ==========================================================================
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册