From 1ddf1b6422d6c3c39b82021c8bd4d16a2550f12d Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Fri, 11 Mar 2022 14:47:07 +0800 Subject: $top/Makefile.inc: Move common folder before other sibling ones Putting src/soc/*/common before src/soc/*/*, and src/superio/common before src/superio/*,(which is already moved but with duplicated folder "common") can make the variables in common Makefile get the expected value before they are used in other subdirs. The later "*" also contains "common", which needs to be eliminated by "filter-out". Then we can put some common variables from all the subdir Makefile.inc to the common Makefile.inc to reduce code redundancy. Change-Id: I99597af22cac6d12aaef348789664cd7db02ba06 Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/c/coreboot/+/62750 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- Makefile.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile.inc') diff --git a/Makefile.inc b/Makefile.inc index ec2d097b2dda..929c236dd623 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -81,8 +81,9 @@ PHONY+= clean-abuild coreboot check-style build_complete # root source directories of coreboot subdirs-y := src/lib src/commonlib/ src/console src/device src/acpi src/superio/common subdirs-y += src/ec/acpi $(wildcard src/ec/*/*) $(wildcard src/southbridge/*/*) -subdirs-y += $(wildcard src/soc/*) $(wildcard src/soc/*/*) $(wildcard src/northbridge/*/*) -subdirs-y += $(wildcard src/superio/*) $(wildcard src/superio/*/*) +subdirs-y += $(wildcard src/soc/*) $(wildcard src/soc/*/common) $(filter-out $(wildcard src/soc/*/common),$(wildcard src/soc/*/*)) +subdirs-y += $(wildcard src/northbridge/*/*) +subdirs-y += $(filter-out src/superio/common,$(wildcard src/superio/*)) $(wildcard src/superio/*/*) subdirs-y += $(wildcard src/drivers/*) $(wildcard src/drivers/*/*) $(wildcard src/drivers/*/*/*) subdirs-y += src/cpu src/vendorcode subdirs-y += util/cbfstool util/sconfig util/nvramtool util/pgtblgen util/amdfwtool -- cgit v1.2.3