Nico Huber has uploaded this change for review. ( https://review.coreboot.org/27324
Change subject: Makefile.inc: Rewrite $(files-in-dir)
......................................................................
Makefile.inc: Rewrite $(files-in-dir)
The $(files-in-dir) macro is supposed to return all files (out of a
given set) that reside directly (non-recursive) in a given directory.
While the current solution worked splendidly, we can achieve the same
without recursive macros that look at each parent dir individually.
This also fixes a future make error, as make doesn't like the variable
name ` ` anymore ;)
Change-Id: Iac0eacdf91b8b5098592ad301c1f3fdb632454e9
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M Makefile.inc
1 file changed, 8 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/27324/1
diff --git a/Makefile.inc b/Makefile.inc
index 446e321..67ddb63 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -155,29 +155,19 @@
# Helper functions for ramstage postprocess
spc :=
spc +=
-$(spc) :=
-$(spc) +=
comma := ,
-# files-in-dir-recursive,dir,files
-files-in-dir-recursive=$(filter $(1)%,$(2))
+# Returns all files and dirs below `dir` (recursively).
+# files-below-dir,dir,files
+files-below-dir=$(filter $(1)%,$(2))
-# parent-dir,dir/
-parent-dir=$(dir $(if $(patsubst /%,,$(1)),,/)$(subst $( ),/,$(strip $(subst /, ,$(1)))))
+# Returns all dirs below `dir` (recursively).
+# dirs-below-dir,dir,files
+dirs-below-dir=$(filter-out $(1),$(sort $(dir $(call files-below-dir,$(1),$(2)))))
-# filters out exactly the directory specified
-# filter-out-dir,dir_to_keep,dirs
-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)))
-
-# dir-wildcards,dirs
-dir-wildcards=$(addsuffix %,$(1))
-
+# Returns all files directly in `dir` (non-recursively).
# files-in-dir,dir,files
-files-in-dir=$(filter-out $(call dir-wildcards,$(call filter-out-dirs,$(1),$(sort $(dir $(2))))),$(call files-in-dir-recursive,$(1),$(2)))
+files-in-dir=$(filter-out $(addsuffix %,$(call dirs-below-dir,$(1),$(2))),$(call files-below-dir,$(1),$(2)))
#######################################################################
# reduce command line length by linking the objects of each
--
To view, visit https://review.coreboot.org/27324
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac0eacdf91b8b5098592ad301c1f3fdb632454e9
Gerrit-Change-Number: 27324
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Hello Arthur Heymans, Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/27307
to look at the new patch set (#2).
Change subject: nb/intel/i945: Add macro for device 0:01.0
......................................................................
nb/intel/i945: Add macro for device 0:01.0
Change-Id: Iee1c1e4b7fef21608f2678a1d4104b668a66a7e5
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M src/northbridge/intel/i945/early_init.c
M src/northbridge/intel/i945/i945.h
2 files changed, 21 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/27307/2
--
To view, visit https://review.coreboot.org/27307
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iee1c1e4b7fef21608f2678a1d4104b668a66a7e5
Gerrit-Change-Number: 27307
Gerrit-PatchSet: 2
Gerrit-Owner: Elyes HAOUAS <ehaouas(a)noos.fr>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>