kbuild: let addtree result in absolute paths only
RFC PATCH 2/6 kbuild: let addtree result in absolute paths only
From: Peter Oberparleiter <[email protected]>
--- scripts/Kbuild.include | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
scripts/Kbuild.include +1 -1
@@ -144,7 +144,7 @@ ld-option = $(call try-run,\ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj # Prefix -I with $(srctree) if it is not an absolute path. -addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1) +addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)) # Find all -I options and call addtree flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
Quoted 11 lines · Peter Oberparleiter
From: Peter Oberparleiter <[email protected]>
Signed-off-by Peter Oberparleiter <[email protected]>--- scripts/Kbuild.include | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)Index: linux-2.6.26-rc1/scripts/Kbuild.include
===================================================================
scripts/Kbuild.include ld-option = $(call try-run,\ · line 150
Quoted 8 lines
scripts/Kbuild.include +1
-1@@ -144,7 +144,7 @@ ld-option = $(call try-run,\ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj # Prefix -I with $(srctree) if it is not an absolute path. -addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1) +addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)) # Find all -I options and call addtree flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
We try to make all paths relative so less files get rebuild if you access the same source from two different paths (think nfs mounted src etc). So you really need to justify this change.
Sam
Quoted 13 lines · Sam Ravnborg
Quoted 12 lines · Peter Oberparleiter
From: Peter Oberparleiter <[email protected]>
Signed-off-by Peter Oberparleiter <[email protected]>===================================================================
scripts/Kbuild.include +1
-1@@ -144,7 +144,7 @@ ld-option = $(call try-run,\ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj # Prefix -I with $(srctree) if it is not an absolute path. -addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1) +addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1))
Quoted 6 lines
scripts/Kbuild.include ld-option = $(call try-run,\ · line 150
Quoted 2 lines
scripts/Kbuild.include +0
-0# Find all -I options and call addtree flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))We try to make all paths relative so less files get rebuild if you access the same source from two different paths (think nfs mounted src etc). So you really need to justify this change.
I understand your point about keeping as many paths as possible relative and would like to discuss that in the reply to patch 3, where most changes towards absolute paths are done.
As for this patch: on second thought I think this change makes no sense without the next patch - I'll have to redo them both.
Regards,
Peter
Quoted 12 lines · On Mon, 05 May 2008 17:24:16 +0200 Peter Oberparleiter…
From: Peter Oberparleiter <[email protected]>
Signed-off-by Peter Oberparleiter <[email protected]>--- scripts/Kbuild.include | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)Index: linux-2.6.26-rc1/scripts/Kbuild.include
===================================================================
scripts/Kbuild.include ld-option = $(call try-run,\ · line 150
Quoted 8 lines
scripts/Kbuild.include +1
-1@@ -144,7 +144,7 @@ ld-option = $(call try-run,\ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj # Prefix -I with $(srctree) if it is not an absolute path. -addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1) +addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)) # Find all -I options and call addtree flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
-ENOCHANGLEOG. What is the reason for this change?
scripts/Kbuild.include ld-option = $(call try-run,\ · line 147
Quoted 7 lines · Peter Oberparleiter
+++ linux-2.6.26-rc1/scripts/Kbuild.include
(quoted diff) +0
-0@@ -144,7 +144,7 @@ ld-option = $(call try-run,\build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
# Prefix -I with $(srctree) if it is not an absolute path.
scripts/Kbuild.include +1
-1-addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1) +addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1))
At least make it so that relative can be used whenever possible (e.g. on !CONFIG_GCOV)
Quoted 11 lines · Jan Engelhardt
scripts/Kbuild.include ld-option = $(call try-run,\ · line 147
Quoted 7 lines · Peter Oberparleiter
+++ linux-2.6.26-rc1/scripts/Kbuild.include
(quoted diff) +0
-0@@ -144,7 +144,7 @@ ld-option = $(call try-run,\build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
# Prefix -I with $(srctree) if it is not an absolute path.
scripts/Kbuild.include +1
-1-addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1) +addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1))At least make it so that relative can be used whenever possible (e.g. on !CONFIG_GCOV)
Good idea - I'll consider it for the next patch version.
Regards,
Peter