diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2014-05-21 22:36:13 +0200 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2014-05-23 08:35:27 +0200 |
commit | 1f946706f119a7ec974170926165793f6f9ddd12 (patch) | |
tree | f2b24647d60b327a34b5327547fabdedc96120cc | |
parent | 68a56caf7e9bb0203de1d4d96861ba60885a401d (diff) |
build: allow obj=/absolute/path
This allows moving the build tree outside the source tree.
Change-Id: I97882c4820d2c962c27bf8d50378e64016ce5790
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/5803
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r-- | Makefile.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.inc b/Makefile.inc index 529250d9b9..2b62e785f1 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -88,7 +88,7 @@ $(spc) += files-in-dir-recursive=$(filter $(1)%,$(2)) # parent-dir,dir/ -parent-dir=$(dir $(subst $( ),/,$(strip $(subst /, ,$(1))))) +parent-dir=$(dir $(if $(patsubst /%,,$(1)),,/)$(subst $( ),/,$(strip $(subst /, ,$(1))))) # filters out exactly the directory specified # filter-out-dir,dir_to_keep,dirs @@ -96,13 +96,13 @@ filter-out-dir=$(filter-out $(1),$(2)) # filters out dir_to_keep and all its parents # filter-out-dirs,dir_to_keep,dirs -filter-out-dirs=$(if $(filter-out ./,$(1)),$(call filter-out-dirs,$(call parent-dir,$(1)),$(call filter-out-dir,$(1),$(2))),$(call filter-out-dir,$(1),$(2))) +filter-out-dirs=$(if $(filter-out ./ /,$(1)),$(call filter-out-dirs,$(call parent-dir,$(1)),$(call filter-out-dir,$(1),$(2))),$(call filter-out-dir,$(1),$(2))) # dir-wildcards,dirs dir-wildcards=$(addsuffix %,$(1)) # files-in-dir,dir,files -files-in-dir=$(filter-out $(call dir-wildcards,$(call filter-out-dirs,$(1),$(dir $(2)))),$(call files-in-dir-recursive,$(1),$(2))) +files-in-dir=$(filter-out $(call dir-wildcards,$(call filter-out-dirs,$(1),$(sort $(dir $(2))))),$(call files-in-dir-recursive,$(1),$(2))) ####################################################################### # reduce command line length by linking the objects of each |