mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-23 18:49:01 +08:00
nits
This commit is contained in:
parent
3c10b36651
commit
adb12bb7be
@ -6,26 +6,32 @@ REVNO ?= --mr v3.7-branch
|
||||
YQ ?= $(DOCKER) --user="root" mikefarah/yq
|
||||
|
||||
all: zephyr $(PROJECTS)
|
||||
rm -rf build
|
||||
echo
|
||||
|
||||
$(PROJECTS): FORCE
|
||||
$(DOCKER) -e ZEPHYR_BASE=$(ZEPHYR_DIR)/zephyr $(IMAGE) west build -b $(ZBNAME) -p auto $(realpath $@)
|
||||
rm -rf build
|
||||
|
||||
FORCE:
|
||||
|
||||
zephyr: init minify update
|
||||
zephyr: $(ZEPHYR_DIR)/modules/hal/cmsis
|
||||
|
||||
init: FORCE
|
||||
test -d $(ZEPHYR_DIR) || ( mkdir -p $(ZEPHYR_DIR) ; \
|
||||
$(DOCKER) $(IMAGE) west init $(REVNO) $(ZEPHYR_DIR))
|
||||
|
||||
update: FORCE
|
||||
$(ZEPHYR_DIR)/modules/hal/cmsis: $(ZEPHYR_DIR)/zephyr/west.yml
|
||||
$(DOCKER) $(IMAGE) /bin/sh -c 'cd $(ZEPHYR_DIR) && west update'
|
||||
touch $(ZEPHYR_DIR)/modules/hal/cmsis
|
||||
|
||||
minify: FORCE
|
||||
$(YQ) -i eval '(.manifest.defaults, .manifest.remotes, .manifest.projects[] | select(.name == "cmsis" or .name == "hal_stm32" or .name == "hal_nxp" or .name == "hal_espressif" or .name == "hal_rpi_pico" or .name == "segger" or .name == "mbedtls" or .name == "mcuboot" or .name == "picolibc" | del(.null) ), .manifest.self) as $$i ireduce({};setpath($$i | path; $$i)) | del(.manifest.projects.[].null) | del(..|select(length==0))' $(ZEPHYR_DIR)/zephyr/west.yml
|
||||
# use '(YQ) -i eval' for in-place minify; this allows proper dependency processing and update. ALWAYS include "cmsis"...
|
||||
$(ZEPHYR_DIR)/zephyr/west.yml: $(ZEPHYR_DIR)/zephyr/west.yml.orig
|
||||
$(YQ) eval '(.manifest.defaults, .manifest.remotes, .manifest.projects[] | select(.name == "cmsis" or .name == "hal_stm32" or .name == "hal_nxp" or .name == "hal_espressif" or .name == "hal_rpi_pico" or .name == "segger" or .name == "mbedtls" or .name == "mcuboot" or .name == "picolibc" | del(.null) ), .manifest.self) as $$i ireduce({};setpath($$i | path; $$i)) | del(.manifest.projects.[].null) | del(..|select(length==0))' $(ZEPHYR_DIR)/zephyr/west.yml.orig > $(ZEPHYR_DIR)/zephyr/west.yml
|
||||
|
||||
$(ZEPHYR_DIR)/zephyr/west.yml.orig: FORCE
|
||||
test -d $(ZEPHYR_DIR) || \
|
||||
( mkdir -p $(ZEPHYR_DIR) && \
|
||||
$(DOCKER) $(IMAGE) west init $(REVNO) $(ZEPHYR_DIR) && \
|
||||
mv $(ZEPHYR_DIR)/zephyr/west.yml $(ZEPHYR_DIR)/zephyr/west.yml.orig )
|
||||
|
||||
|
||||
# Wizard-style board name --> Zephyr board name; ZBNAME = table[BOARD]
|
||||
Z_f207 := nucleo_f207zg
|
||||
Z_f429 := nucleo_f429zi
|
||||
Z_f746 := nucleo_f746zg
|
||||
|
Loading…
Reference in New Issue
Block a user