2016-04-06 23:48:30 +02:00
|
|
|
# Print a list of the modules that could be built
|
2022-02-08 09:59:21 +01:00
|
|
|
# Currently runtime_dependencies only include the runtime libs information for cc binaries.
|
2016-04-06 23:48:30 +02:00
|
|
|
|
|
|
|
MODULE_INFO_JSON := $(PRODUCT_OUT)/module-info.json
|
2023-06-02 23:56:24 +02:00
|
|
|
COMMA := ,
|
|
|
|
_NEWLINE := '\n'
|
2016-04-06 23:48:30 +02:00
|
|
|
|
|
|
|
$(MODULE_INFO_JSON):
|
|
|
|
@echo Generating $@
|
|
|
|
$(hide) echo -ne '{\n ' > $@
|
2023-06-06 22:39:05 +02:00
|
|
|
$(hide) echo -ne $(KATI_foreach_sep m,$(COMMA)$(_NEWLINE), $(sort $(ALL_MODULES)),\
|
|
|
|
'"$(m)": {' \
|
|
|
|
'"class": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).CLASS)),"$(w)")],' \
|
|
|
|
'"path": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).PATH)),"$(w)")],' \
|
|
|
|
'"tags": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).TAGS)),"$(w)")],' \
|
|
|
|
'"installed": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).INSTALLED)),"$(w)")],' \
|
|
|
|
'"compatibility_suites": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).COMPATIBILITY_SUITES)),"$(w)")],' \
|
|
|
|
'"auto_test_config": [$(ALL_MODULES.$(m).auto_test_config)],' \
|
|
|
|
'"module_name": "$(ALL_MODULES.$(m).MODULE_NAME)"$(COMMA)' \
|
|
|
|
'"test_config": [$(KATI_foreach_sep w,$(COMMA) ,$(strip $(ALL_MODULES.$(m).TEST_CONFIG) $(ALL_MODULES.$(m).EXTRA_TEST_CONFIGS)),"$(w)")],' \
|
2023-11-14 20:06:08 +01:00
|
|
|
'"dependencies": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).ALL_DEPS)),"$(w)")],' \
|
2023-06-06 22:39:05 +02:00
|
|
|
'"shared_libs": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).SHARED_LIBS)),"$(w)")],' \
|
|
|
|
'"static_libs": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).STATIC_LIBS)),"$(w)")],' \
|
|
|
|
'"system_shared_libs": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).SYSTEM_SHARED_LIBS)),"$(w)")],' \
|
|
|
|
'"srcs": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).SRCS)),"$(w)")],' \
|
|
|
|
'"srcjars": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).SRCJARS)),"$(w)")],' \
|
|
|
|
'"classes_jar": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).CLASSES_JAR)),"$(w)")],' \
|
|
|
|
'"test_mainline_modules": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).TEST_MAINLINE_MODULES)),"$(w)")],' \
|
|
|
|
'"is_unit_test": "$(ALL_MODULES.$(m).IS_UNIT_TEST)"$(COMMA)' \
|
|
|
|
'"test_options_tags": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).TEST_OPTIONS_TAGS)),"$(w)")],' \
|
|
|
|
'"data": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).TEST_DATA)),"$(w)")],' \
|
|
|
|
'"runtime_dependencies": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).LOCAL_RUNTIME_LIBRARIES)),"$(w)")],' \
|
|
|
|
'"static_dependencies": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).LOCAL_STATIC_LIBRARIES)),"$(w)")],' \
|
|
|
|
'"data_dependencies": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).TEST_DATA_BINS)),"$(w)")],' \
|
|
|
|
'"supported_variants": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).SUPPORTED_VARIANTS)),"$(w)")],' \
|
|
|
|
'"host_dependencies": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).HOST_REQUIRED_FROM_TARGET)),"$(w)")],' \
|
|
|
|
'"target_dependencies": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).TARGET_REQUIRED_FROM_HOST)),"$(w)")]' \
|
2023-06-02 23:56:24 +02:00
|
|
|
'}')'\n}\n' >> $@
|
2016-04-06 23:48:30 +02:00
|
|
|
|
|
|
|
|
2021-06-16 04:35:06 +02:00
|
|
|
droidcore-unbundled: $(MODULE_INFO_JSON)
|
2016-04-06 23:48:30 +02:00
|
|
|
|
2018-09-06 21:23:11 +02:00
|
|
|
$(call dist-for-goals, general-tests, $(MODULE_INFO_JSON))
|
2021-06-16 04:35:06 +02:00
|
|
|
$(call dist-for-goals, droidcore-unbundled, $(MODULE_INFO_JSON))
|
2022-10-27 03:16:44 +02:00
|
|
|
|
|
|
|
# On every build, generate an all_modules.txt file to be used for autocompleting
|
|
|
|
# the m command. After timing this using $(shell date +"%s.%3N"), it only adds
|
|
|
|
# 0.01 seconds to the internal master build, and will only rerun on builds that
|
|
|
|
# rerun kati.
|
|
|
|
$(file >$(PRODUCT_OUT)/all_modules.txt,$(subst $(space),$(newline),$(ALL_MODULES)))
|