New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 761922 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

ec: Some makefile dependencies are missing

Project Member Reported by cheyuw@google.com, Sep 5 2017

Issue description

Some makefile dependencies are added by build.mk in subdirectories.
For example, in util/build.mk
"""
deps += $(out)/util/usb_pd_policy.o.d
"""

But they will be overwritten later by the assignment in Makefile,
"""
deps := $(ro-deps) $(rw-deps)
"""

So those dependencies won't be in the final $(deps)

What steps will reproduce the problem?
(1) Add "$(info $(deps))" before "-include $(deps)" in Makefile.rules
(2) make BOARD=eve utils
(3) There is no "build/eve/util/usb_pd_policy.o.d" in $(deps)


 

Comment 1 by cheyuw@google.com, Sep 5 2017

Cc: aaboagye@google.com drinkcat@chromium.org vpalatin@chromium.org
Maybe it is fine to use "deps += $(ro-deps) $(rw-deps)" ?
Yes "+=" is probably ok here.

While you are fixing this we might want an additional detail:
the quoted "deps +=" is protected by a giant "ifeq 
 $(CONFIG_USB_POWER_DELIVERY),y)", but we might want to use the same condition as for everything else:
e.g.
deps := $(ro-deps) $(rw-deps) $(deps-y)
with the additional dependency declared like this to depend on the config option:
deps-$(CONFIG_USB_POWER_DELIVERY) += $(out)/util/usb_pd_policy.o.d
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/653a18ffc412403963f6bc4b705c256062bf2f72

commit 653a18ffc412403963f6bc4b705c256062bf2f72
Author: Che-yu Wu <cheyuw@google.com>
Date: Tue Sep 05 15:21:27 2017

ec: Fix missing Makefile dependencies.

Add the extra dependencies to "deps-y" and include it in "deps".

BUG= chromium:761922 
BRANCH=none
TEST=Add "$(info $(deps))" before "-include $(deps)" in Makefile.rules
     make BOARD=eve utils | grep "build/eve/util/usb_pd_policy.o.d"
     There is "build/eve/util/usb_pd_policy.o.d"

Change-Id: I77670a8e90a1a913943fcba143402318aaf7d274
Signed-off-by: Che-yu Wu <cheyuw@google.com>
Reviewed-on: https://chromium-review.googlesource.com/649455
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>

[modify] https://crrev.com/653a18ffc412403963f6bc4b705c256062bf2f72/util/build.mk
[modify] https://crrev.com/653a18ffc412403963f6bc4b705c256062bf2f72/Makefile

Comment 4 by cheyuw@google.com, Sep 6 2017

Status: Fixed (was: Untriaged)

Comment 5 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 6 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment