diff mbox series

build: fix dependency file inclusion

Message ID 1602444274-I82fb3a7c2fabf91edea3d5e5052d0fe11ec41137@changeid
State Accepted
Headers show
Series build: fix dependency file inclusion | expand

Commit Message

Johannes Berg Oct. 11, 2020, 7:24 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

The objs.mk include changes for archive files broke things
completely and none of the dependency files (*.d) ever got
included, as the expansion there ended up empty.

Clearly, my mistake, I should've tested that better. As we
don't need the %.a files in the list there use filter-out
to remove them, rather than what I had lazily wanted to do,
which was trying to read %.d files for them. The filter-out
actually works, and avoids looking up files that can never
exist in the first place.

Fixes: 87098d3324e0 ("build: Put archive files into build/ folder too")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 src/objs.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jouni Malinen Oct. 12, 2020, 8:50 a.m. UTC | #1
On Sun, Oct 11, 2020 at 09:24:34PM +0200, Johannes Berg wrote:
> The objs.mk include changes for archive files broke things
> completely and none of the dependency files (*.d) ever got
> included, as the expansion there ended up empty.
> 
> Clearly, my mistake, I should've tested that better. As we
> don't need the %.a files in the list there use filter-out
> to remove them, rather than what I had lazily wanted to do,
> which was trying to read %.d files for them. The filter-out
> actually works, and avoids looking up files that can never
> exist in the first place.

Thanks, applied.
diff mbox series

Patch

diff --git a/src/objs.mk b/src/objs.mk
index 54e42e6999df..a3040b21bd94 100644
--- a/src/objs.mk
+++ b/src/objs.mk
@@ -1,3 +1,3 @@ 
 $(_OBJS_VAR) := $(call BUILDOBJ,$($(_OBJS_VAR)))
--include $($($(_OBJS_VAR):%.o=%.d):%.a=%.d)
+-include $(filter-out %.a,$($(_OBJS_VAR):%.o=%.d))
 _DIRS += $(dir $($(_OBJS_VAR)))