Skip to content

Commit

Permalink
scripts: xilinx: always call library.mk on deps
Browse files Browse the repository at this point in the history
Library dependencies are managed in library.mk, this commit ensures
that library.mk manage and skip them by setting a dummy FORCE target.
When building a project, it is desired to rebuild all libraries that
have been modified.
Previously, the solution placed component.xml files as dependencies,
skipping these targets if the file already exists, but ignored changes
to them.

Signed-off-by: Jorge Marques <[email protected]>
  • Loading branch information
gastmaier authored and liambeguin committed Nov 10, 2023
1 parent bbee631 commit bd63722
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions projects/scripts/project-xilinx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## SPDX short identifier: BSD-1-Clause
####################################################################################

# Assumes this file is in prpojects/scripts/project-xilinx.mk
# Assumes this file is in projects/scripts/project-xilinx.mk
HDL_PROJECT_PATH := $(subst scripts/project-xilinx.mk,,$(lastword $(MAKEFILE_LIST)))
HDL_LIBRARY_PATH := $(HDL_PROJECT_PATH)../library/

Expand Down Expand Up @@ -74,7 +74,7 @@ M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_project_xilinx.tcl
M_DEPS += $(HDL_PROJECT_PATH)../scripts/adi_env.tcl
M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_board.tcl

M_DEPS += $(foreach dep,$(LIB_DEPS),$(HDL_LIBRARY_PATH)$(dep)/component.xml)
M_DEPS += $(foreach dep,$(LIB_DEPS),$(HDL_LIBRARY_PATH)$(dep)/)

.PHONY: all lib clean clean-all

Expand Down Expand Up @@ -114,7 +114,8 @@ $(PROJECT_NAME).sdk/system_top.xsa: $(M_DEPS)
$(PROJECT_NAME)_vivado.log, \
$(HL)$(PROJECT_NAME)$(NC) project)

$(HDL_LIBRARY_PATH)%/component.xml:
FORCE:
$(HDL_LIBRARY_PATH)%/: FORCE
if [ -n "${REQUIRED_VIVADO_VERSION}" ]; then \
$(MAKE) -C $(dir $@) $(TARGET) REQUIRED_VIVADO_VERSION=${REQUIRED_VIVADO_VERSION} || exit $$?; \
else \
Expand Down

0 comments on commit bd63722

Please sign in to comment.