mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-23 07:21:14 +02:00
Merge pull request #620 from flatcar-linux/sayan/adjust-the-fix-the-srctree-patch
Adjust the `srctree` based on the presence of KBUILD_OUTPUT
This commit is contained in:
commit
3b034a8c5d
@ -8,24 +8,26 @@ provided they stay reachable relative to one another. Useful for
|
|||||||
builds done within a sandbox where the eventual root is prefixed
|
builds done within a sandbox where the eventual root is prefixed
|
||||||
by some undesirable path component.
|
by some undesirable path component.
|
||||||
---
|
---
|
||||||
Makefile | 2 +-
|
Makefile | 6 ++++--
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
index 36eab48d1d4a..0514c0fa114d 100644
|
index 36eab48d1d4a..0514c0fa114d 100644
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -230,9 +230,7 @@ else
|
@@ -230,8 +230,10 @@ else
|
||||||
building_out_of_srctree := 1
|
building_out_of_srctree := 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
-ifneq ($(KBUILD_ABS_SRCTREE),)
|
-ifneq ($(KBUILD_ABS_SRCTREE),)
|
||||||
-srctree := $(abs_srctree)
|
-srctree := $(abs_srctree)
|
||||||
-endif
|
+ifneq ($(KBUILD_OUTPUT),)
|
||||||
+ srctree := $(shell realpath --relative-to=$(KBUILD_OUTPUT) $(abs_srctree))
|
+ srctree := $(shell realpath --relative-to=$(KBUILD_OUTPUT) $(abs_srctree))
|
||||||
|
+else
|
||||||
|
+ srctree := $(abs_srctree)
|
||||||
|
endif
|
||||||
|
|
||||||
objtree := .
|
objtree := .
|
||||||
VPATH := $(srctree)
|
|
||||||
--
|
--
|
||||||
2.26.2
|
2.26.2
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user