This isn't much more than `find | sed` to adjust all uses of $(srctree). This is split into a separate commit to highlight the actual changes to the build machinery. Include the instance of $(objtree) in include/uapi/Makefile while at it. Signed-off-by: Elliott Mitchell <ehem+linux@xxxxxxx> --- `grep` was also used to locate things which needed other actions (notably the non-toplevel Makefile adjustments), but this is roughly: find . -name Kbuild\* -print0 | xargs -0 sed -i -e's,$(srctree)$,$(srctree:%/=%),' -e's,$(srctree)\([^,/]\),$(srctree:%/=%)\1,g' -es',$(srctree)/,$(srctree),g' There could be goofs in here or missed bits. I hope not, but... --- scripts/Kbuild.include | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 7778cc97a4e0..6d2a3c34a3f2 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -62,7 +62,7 @@ stringify = $(squote)$(quote)$1$(quote)$(squote) ### # The path to Kbuild or Makefile. Kbuild has precedence over Makefile. -kbuild-dir = $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) +kbuild-dir = $(if $(filter /%,$(src)),$(src),$(srctree)$(src)) kbuild-file = $(or $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Makefile) ### @@ -111,19 +111,19 @@ endef # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= # Usage: # $(Q)$(MAKE) $(build)=dir -build := -f $(srctree)/scripts/Makefile.build obj +build := -f $(srctree)scripts/Makefile.build obj ### # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.dtbinst obj= # Usage: # $(Q)$(MAKE) $(dtbinst)=dir -dtbinst := -f $(srctree)/scripts/Makefile.dtbinst obj +dtbinst := -f $(srctree)scripts/Makefile.dtbinst obj ### # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj= # Usage: # $(Q)$(MAKE) $(clean)=dir -clean := -f $(srctree)/scripts/Makefile.clean obj +clean := -f $(srctree)scripts/Makefile.clean obj # pring log # -- 2.39.2