Skip to content

Commit

Permalink
scripts: intel: .timestamp_intel parallel support
Browse files Browse the repository at this point in the history
Add support for touching .timestamp_intel as separated targets.

Signed-off-by: Jorge Marques <[email protected]>
  • Loading branch information
gastmaier committed Nov 10, 2023
1 parent 897a162 commit 7401041
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
15 changes: 7 additions & 8 deletions library/scripts/library.mk
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CLEAN_TARGET += tb/libraries

GENERIC_DEPS += $(HDL_LIBRARY_PATH)../scripts/adi_env.tcl

.PHONY: all intel intel_dep xilinx clean clean-all
.PHONY: all intel xilinx clean clean-all

all: intel xilinx

Expand All @@ -66,17 +66,16 @@ ifneq ($(INTEL_DEPS),)

INTEL_DEPS += $(GENERIC_DEPS)
INTEL_DEPS += $(HDL_LIBRARY_PATH)scripts/adi_ip_intel.tcl
INTEL_DEPS += $(foreach dep,$(INTEL_LIB_DEPS),$(HDL_LIBRARY_PATH)$(dep)/.timestamp_intel)
_INTEL_LIB_DEPS = $(foreach dep,$(INTEL_LIB_DEPS),$(HDL_LIBRARY_PATH)$(dep)/.timestamp_intel)

intel: intel_dep .timestamp_intel
intel: .timestamp_intel

.timestamp_intel: $(INTEL_DEPS)
.timestamp_intel: $(INTEL_DEPS) $(_INTEL_LIB_DEPS)
touch $@

intel_dep:
@for lib in $(INTEL_LIB_DEPS); do \
$(MAKE) -C $(HDL_LIBRARY_PATH)$${lib} intel || exit $$?; \
done
$(_INTEL_LIB_DEPS):
$(MAKE) -C $(dir $@) intel

endif

ifneq ($(XILINX_DEPS),)
Expand Down
24 changes: 11 additions & 13 deletions projects/scripts/project-intel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,23 @@ M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_tquest.tcl
M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_project_intel.tcl
M_DEPS += $(HDL_PROJECT_PATH)../scripts/adi_env.tcl

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

.PHONY: all lib clean clean-all
all: lib $(PROJECT_NAME).sof
all: $(PROJECT_NAME).sof

lib: TARGET:=intel
lib: $(M_DEPS)

clean:
$(call clean, \
$(CLEAN_TARGET), \
$(HL)$(PROJECT_NAME)$(NC) project)
-rm -Rf ${DIR_NAME}

clean-all: clean
@for lib in $(LIB_DEPS); do \
$(MAKE) -C $(HDL_LIBRARY_PATH)$${lib} clean; \
done
@for dir in ${CLEAN_DIRS}; do \
rm -Rf $${dir}; \
done
clean-all: TARGET:=clean
clean-all: clean $(M_DEPS)
@rm -Rf $(CLEAN_DIRS)

$(PROJECT_NAME).sof: $(M_DEPS)
-rm -rf $(CLEAN_TARGET)
Expand All @@ -128,7 +127,6 @@ $(PROJECT_NAME).sof: $(M_DEPS)
$(PROJECT_NAME)_quartus.log, \
$(HL)$(PROJECT_NAME)$(NC))

lib:
@for lib in $(LIB_DEPS); do \
$(MAKE) -C $(HDL_LIBRARY_PATH)$${lib} intel || exit $$?; \
done
FORCE:
$(HDL_LIBRARY_PATH)%/: FORCE
$(MAKE) -C $(dir $@) $(TARGET) || exit $$?; \

0 comments on commit 7401041

Please sign in to comment.