diff options
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r-- | scripts/Kbuild.include | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 59620b1554e0..b0d067be7390 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -87,6 +87,11 @@ cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \ | |||
87 | # $(Q)$(MAKE) $(build)=dir | 87 | # $(Q)$(MAKE) $(build)=dir |
88 | build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj | 88 | build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj |
89 | 89 | ||
90 | # Prefix -I with $(srctree) if it is not an absolute path | ||
91 | addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1) | ||
92 | # Find all -I options and call addtree | ||
93 | flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) | ||
94 | |||
90 | # If quiet is set, only print short version of command | 95 | # If quiet is set, only print short version of command |
91 | cmd = @$(echo-cmd) $(cmd_$(1)) | 96 | cmd = @$(echo-cmd) $(cmd_$(1)) |
92 | 97 | ||