diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e9e6febd9..731ad0f9c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -40,5 +40,6 @@ "marus25.cortex-debug" ] } - } + }, + "postStartCommand": "rm -f .west-updated" } diff --git a/.gitignore b/.gitignore index 52fcf40f2..7b101e821 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ .DS_Store build/ ccache/* -release/* \ No newline at end of file +release/* +.west-updated \ No newline at end of file diff --git a/Makefile b/Makefile index 8c5875468..f6af8a0a2 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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); \