blob: 4ef6eb8fcb6a442d6e08be1a82eea76f9b8fab39 [file] [log] [blame]
Joe Onorato48bd6f52016-04-06 14:48:30 -07001# Print a list of the modules that could be built
yangbillfa5026c2022-02-08 16:59:21 +08002# Currently runtime_dependencies only include the runtime libs information for cc binaries.
Joe Onorato48bd6f52016-04-06 14:48:30 -07003
4MODULE_INFO_JSON := $(PRODUCT_OUT)/module-info.json
5
6$(MODULE_INFO_JSON):
7 @echo Generating $@
8 $(hide) echo -ne '{\n ' > $@
9 $(hide) echo -ne $(foreach m, $(sort $(ALL_MODULES)), \
10 ' "$(m)": {' \
11 '"class": [$(foreach w,$(sort $(ALL_MODULES.$(m).CLASS)),"$(w)", )], ' \
12 '"path": [$(foreach w,$(sort $(ALL_MODULES.$(m).PATH)),"$(w)", )], ' \
13 '"tags": [$(foreach w,$(sort $(ALL_MODULES.$(m).TAGS)),"$(w)", )], ' \
14 '"installed": [$(foreach w,$(sort $(ALL_MODULES.$(m).INSTALLED)),"$(w)", )], ' \
Kevin Cheng22609182017-11-28 15:04:40 -080015 '"compatibility_suites": [$(foreach w,$(sort $(ALL_MODULES.$(m).COMPATIBILITY_SUITES)),"$(w)", )], ' \
Dan Shiefb892d2017-12-06 15:57:31 -080016 '"auto_test_config": [$(ALL_MODULES.$(m).auto_test_config)], ' \
yangbillf90b7342018-08-28 20:40:42 +080017 '"module_name": "$(ALL_MODULES.$(m).MODULE_NAME)", ' \
Dan Shicb49d992020-08-21 16:48:37 -070018 '"test_config": [$(foreach w,$(strip $(ALL_MODULES.$(m).TEST_CONFIG) $(ALL_MODULES.$(m).EXTRA_TEST_CONFIGS)),"$(w)", )], ' \
Brandon Lee5568c192018-09-12 17:39:32 +080019 '"dependencies": [$(foreach w,$(sort $(ALL_DEPS.$(m).ALL_DEPS)),"$(w)", )], ' \
yangbill5f5e2362021-10-13 16:25:35 +080020 '"shared_libs": [$(foreach w,$(sort $(ALL_MODULES.$(m).SHARED_LIBS)),"$(w)", )], ' \
21 '"system_shared_libs": [$(foreach w,$(sort $(ALL_MODULES.$(m).SYSTEM_SHARED_LIBS)),"$(w)", )], ' \
Brandon Lee5568c192018-09-12 17:39:32 +080022 '"srcs": [$(foreach w,$(sort $(ALL_MODULES.$(m).SRCS)),"$(w)", )], ' \
patricktuab435e32019-05-10 15:34:26 +080023 '"srcjars": [$(foreach w,$(sort $(ALL_MODULES.$(m).SRCJARS)),"$(w)", )], ' \
patricktu379f7f02019-05-27 18:48:21 +080024 '"classes_jar": [$(foreach w,$(sort $(ALL_MODULES.$(m).CLASSES_JAR)),"$(w)", )], ' \
kellyhung0ba6ec62020-08-28 00:19:53 +080025 '"test_mainline_modules": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_MAINLINE_MODULES)),"$(w)", )], ' \
yangbill732b8582021-01-08 17:36:56 +080026 '"is_unit_test": "$(ALL_MODULES.$(m).IS_UNIT_TEST)", ' \
yangbill724565d2021-12-21 18:59:33 +080027 '"data": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_DATA)),"$(w)", )], ' \
yangbillfa5026c2022-02-08 16:59:21 +080028 '"runtime_dependencies": [$(foreach w,$(sort $(ALL_MODULES.$(m).LOCAL_RUNTIME_LIBRARIES)),"$(w)", )], ' \
yangbille6b498b2022-02-11 18:27:32 +080029 '"data_dependencies": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_DATA_BINS)),"$(w)", )], ' \
yangbillb2219c72022-02-18 15:27:53 +080030 '"supported_variants": [$(foreach w,$(sort $(ALL_MODULES.$(m).SUPPORTED_VARIANTS)),"$(w)", )], ' \
Yikee4a54912022-06-27 16:43:23 +080031 '"host_dependencies": [$(foreach w,$(sort $(ALL_MODULES.$(m).HOST_REQUIRED_FROM_TARGET)),"$(w)", )], ' \
Joe Onorato48bd6f52016-04-06 14:48:30 -070032 '},\n' \
33 ) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@
34 $(hide) echo '}' >> $@
35
36
Bill Peckham16da01f2021-06-15 19:35:06 -070037droidcore-unbundled: $(MODULE_INFO_JSON)
Joe Onorato48bd6f52016-04-06 14:48:30 -070038
Simran Basi03f52532018-09-06 12:23:11 -070039$(call dist-for-goals, general-tests, $(MODULE_INFO_JSON))
Bill Peckham16da01f2021-06-15 19:35:06 -070040$(call dist-for-goals, droidcore-unbundled, $(MODULE_INFO_JSON))