Skip to contentSkip to conversation

scripts/Kbuild: Add path of fixeddep script

PATCH In review Laxman Dewangan 2 participants 2 messages Apr 22, 2022 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/Kbuild: Add path of fixeddep script

Add path of the fixdep script from the object tree. This will make the path of script absolute rather than relative and execute the command from makefile from any location.

---
 scripts/Kbuild.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Kbuild.include +1 -1
index cdec22088423e..e07e9265829f8 100644
@@ -147,7 +147,7 @@ if_changed_dep = $(if $(if-changed-cond),$(cmd_and_fixdep),@:)
 
 cmd_and_fixdep =                                                             \
 	$(cmd);                                                              \
-	scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\
+	$(objtree)/scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\
 	rm -f $(depfile)
 
 # Usage: $(call if_changed_rule,foo)
Signature · 1 line
2.17.1
#1 lore raw
Quoted 5 lines · Laxman Dewangan

Add path of the fixdep script from the object tree. This will make the path of script absolute rather than relative and execute the command from makefile from any location.

Why is this necessary?

Also, this patch does not make anything.
$(objtree)/ is still a relative path.
See the top Makefile.

Quoted 22 lines
---
 scripts/Kbuild.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Kbuild.include +1 -2
index cdec22088423e..e07e9265829f8 100644
@@ -147,7 +147,7 @@ if_changed_dep = $(if $(if-changed-cond),$(cmd_and_fixdep),@:)
 
 cmd_and_fixdep =                                                             \
        $(cmd);                                                              \
-       scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\
+       $(objtree)/scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\
        rm -f $(depfile)
 
 # Usage: $(call if_changed_rule,foo)
--

2.17.1

Signature · 2 lines
Best Regards
Masahiro Yamada