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 0ebf907 commit b8f4351
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
"marus25.cortex-debug"
]
}
}
},
"postStartCommand": "rm -f .west-updated"
}
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 b8f4351

Please sign in to comment.