Skip to content

Commit

Permalink
build: update west projects before the build
Browse files Browse the repository at this point in the history
  • Loading branch information
paradajz committed Dec 9, 2024
1 parent e231161 commit 0cf092a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
.DS_Store
build/
ccache/*
release/*
release/*
.west-updated
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ TARGET := $(shell basename $(shell $(FIND) $(TARGET_CONFIG_D
TARGET_BUILD_DIR := $(BUILD_DIR_BASE)/$(TARGET)
TEST_EXECUTE := 1
CMAKE_CONFIG_ARGS :=
WEST_UPDATED_FILE := .west-updated
WEST_MANIFESTS := west.yml

ifneq (,$(shell which ninja))
CMAKE_CONFIG_ARGS += -GNinja
Expand All @@ -27,7 +29,12 @@ CMAKE_CONFIG_ARGS += \

.DEFAULT_GOAL := all

cmake_config:
$(WEST_UPDATED_FILE): $(WEST_MANIFESTS)
@echo "Running west update..."
@west update
@touch $@

cmake_config: $(WEST_UPDATED_FILE)
@if [ ! -d $(TARGET_BUILD_DIR) ]; then \
echo "Generating CMake files"; \
cmake $(CMAKE_CONFIG_ARGS); \
Expand Down

0 comments on commit 0cf092a

Please sign in to comment.