Use QSTR_GLOBAL_REQUIREMENTS to give explicit dependency for qstr generation

I investigated and found that this seems to be the best way to specify
a file that must be generated before "qstr processing" can occur.

Closes #8337
This commit is contained in:
Jeff Epler 2023-08-27 16:09:17 -05:00
parent c395e1f9f7
commit b0967cb1a4
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
3 changed files with 4 additions and 6 deletions

View File

@ -352,7 +352,7 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_CIRCUITPY_COMMON:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o))
SRC_QSTR += $(HEADER_BUILD)/sdiodata.h
QSTR_GLOBAL_REQUIREMENTS += $(HEADER_BUILD)/sdiodata.h
OBJ_EXTRA_ORDER_DEPS += $(HEADER_BUILD)/sioddata.h
$(HEADER_BUILD)/sdiodata.h: tools/mksdiodata.py | $(HEADER_BUILD)
$(Q)$(PYTHON) $< > $@

View File

@ -353,7 +353,7 @@ endif
# create the config headers
.PHONY: do-sdkconfig
do-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h
$(BUILD)/genhdr/qstr.i.last: $(BUILD)/esp-idf/config/sdkconfig.h
QSTR_GLOBAL_REQUIREMENTS += $(BUILD)/esp-idf/config/sdkconfig.h
$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig CMakeLists.txt | $(BUILD)/esp-idf
IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja -DCIRCUITPY_ESPCAMERA=$(CIRCUITPY_ESPCAMERA)
@ -378,9 +378,6 @@ menuconfig: $(BUILD)/esp-idf/config $(BUILD)/esp-idf/config/sdkconfig.h
# We should use that when available. For now, we sort out everything.
python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG)
# qstr builds include headers so we need to make sure they are up to date
$(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h
BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a
BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS))
ifeq ($(IDF_TARGET),esp32)

View File

@ -424,7 +424,8 @@ $(BUILD)/stage2.c: stage2.c.jinja gen_stage2.py | $(BUILD)/
$(STEPECHO) "GEN $<"
$(Q)$(PYTHON) gen_stage2.py $< $@ $(EXTERNAL_FLASH_DEVICES)
$(HEADER_BUILD)/flash_info.h: flash_info.h.jinja gen_stage2.py | $(HEADER_BUILD)/
QSTR_GLOBAL_REQUIREMENTS += $(HEADER_BUILD)/flash_info.h
$(HEADER_BUILD)/flash_info.h: flash_info.h.jinja gen_stage2.py
$(STEPECHO) "GEN $<"
$(Q)$(PYTHON) gen_stage2.py $< $@ $(EXTERNAL_FLASH_DEVICES)