[OpenWrt-Devel] [PATCH v4] build: refactor JSON info files to `profiles.json`

Petr Štetiar ynezz at true.cz
Sat Mar 7 05:34:48 EST 2020


Paul Spooren <mail at aparcar.org> [2020-03-05 12:26:03]:

Hi,

> +json_overview_image_info: FORCE
> +	WORK_DIR=$(BUILD_DIR)/json_info_files \
> +		TARGET_DIR=$(BIN_DIR) \
> +		$(SCRIPT_DIR)/json_overview_image_info.py

it was suggested on IRC to not confuse Make by populating the rule/target in
Python, something like this was suggested, it applies here as well.

	$(SCRIPT_DIR)/json_overview_image_info.py $$@

IIRC `foo.py > $$@` wasn't recommended due to the need of 0 byte length file
handling.

>    $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2))
> -	cp $$^ $$@
> -	$(if $(CONFIG_JSON_ADD_IMAGE_INFO), \
> +	[ -f $$^ ] && cp $$^ $$@ || true

This was explained in the previous review step.

> +	$(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \

You got already same hint from me via email and from Jo on IRC, this should be
turned into separate Make rule.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list