From 29ddbb813fecc42ebb40aa52e5dd73696027d791 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Fri, 20 May 2011 23:31:41 +0000 Subject: [PATCH] Handle absolute source file paths We used to fail there because we unconditionally prefixed the relative directory where it was referenced. Tested in various scenarios: - obj=build - obj=../obj - obj=$PWD/../obj - obj=/some/other/absolute/path - obj=/./some/other/absolute/path In-tree relative paths still work as before, the only change in behaviour is when a source file name (as specified in one of the *-y variables) starts with "/". Signed-off-by: Patrick Georgi Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6606 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 33e35738b..04fbb0261 100644 --- a/Makefile +++ b/Makefile @@ -176,7 +176,7 @@ includemakefiles= \ $(foreach class,$(classes), \ $(eval $(class)-srcs+= \ $$(subst $(top)/,, \ - $$(abspath $$(addprefix $(dir $(1)),$$($(class)-y)))))) \ + $$(abspath $$(subst $(dir $(1))/,/,$$(addprefix $(dir $(1)),$$($(class)-y))))))) \ $(foreach special,$(special-classes), \ $(foreach item,$($(special)-y), $(call $(special)-handler,$(dir $(1)),$(item)))) \ $(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y))))) -- 2.25.1