From 53c7dfee8a20707d22c4a084d222b1e4d70b85a3 Mon Sep 17 00:00:00 2001 From: M4x1m3 Date: Sun, 22 Dec 2019 17:13:28 +0100 Subject: [PATCH] [build] added print-*, made it work --- Makefile | 5 +++++ apps/Makefile | 12 ++++++++++++ escher/Makefile | 10 ++-------- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 6976f63d3..0a3541650 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,11 @@ help: @echo " make PLATFORM=simulator TARGET=web" @echo " make PLATFORM=simulator TARGET=windows" +.PHONY: print-% +print-%: + @echo $* = $($*) + @echo $*\'s origin is $(origin $*) + # Since we're building out-of-tree, we need to make sure the output directories # are created, otherwise the receipes will fail (e.g. gcc will fail to create # "output/foo/bar.o" because the directory "output/foo" doesn't exist). diff --git a/apps/Makefile b/apps/Makefile index 43cf2c95a..7fc4cd594 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -79,6 +79,8 @@ $(eval $(call rule_for, \ $$(PYTHON) apps/i18n.py --header $$(subst .cpp,.h,$$@) --implementation $$@ --locales $$(EPSILON_I18N) --files $$^ \ )) + + $(BUILD_DIR)/apps/i18n.h: $(BUILD_DIR)/apps/i18n.cpp # Handle PNG files @@ -92,6 +94,16 @@ $(call object_for,$(all_app_src)): $(BUILD_DIR)/python/port/genhdr/qstrdefs.gene apps_tests_src = $(app_calculation_test_src) $(app_probability_test_src) $(app_regression_test_src) $(app_sequence_test_src) $(app_shared_test_src) $(app_statistics_test_src) $(app_solver_test_src) + + +$(foreach img,$(image_list), $(eval $(call rule_for, \ + ICON, \ + $(img), \ + $(addprefix themes/themes/, $(addsuffix .json, $(OMEGA_THEME))), \ + $$(PYTHON) themes/themes_manager.py -i $(OMEGA_THEME) $$@ $(BUILD_DIR)/ \ +))) + + # Configure variants apps_all_src = $(app_src) apps_all_src += $(apps_launch_default_src) $(apps_launch_on_boarding_src diff --git a/escher/Makefile b/escher/Makefile index 91c2147c0..6263321ba 100644 --- a/escher/Makefile +++ b/escher/Makefile @@ -102,20 +102,13 @@ $(eval $(call rule_for, \ $$(PYTHON) themes/themes_manager.py $(OMEGA_THEME) $$@ \ )) -$(eval $(call rule_for, \ - THEME, \ - %.png, \ - $(addprefix themes/themes/, $(addsuffix .json, $(OMEGA_THEME))), \ - $$(PYTHON) themes/themes_manager.py -i $(OMEGA_THEME) $$@ $(BUILD_DIR)/ \ -)) - INLINER := $(BUILD_DIR)/escher/image/inliner .PRECIOUS: $(BUILD_DIR)/%.h $(BUILD_DIR)/%.cpp $(eval $(call rule_for, \ INLINER, \ %.h %.cpp, \ - $$(addprefix $$(BUILD_DIR)/,%.png) $$(INLINER), \ + $(BUILD_DIR)/%.png $$(INLINER), \ $$(INLINER) $$< $$(basename $$@).h $$(basename $$@).cpp \ )) @@ -129,4 +122,5 @@ define depends_on_image $(call object_for,$(1)): $(call object_for,$(2)) $(call object_for,$(1)): SFLAGS += $(foreach d,$(sort $(dir $(call object_for,$(1)))),-I$(d)) escher_src += $(2) +image_list += $(2) endef