blob: 2d93128eead49ed341d37be18532fb20182a1330 [file] [log] [blame]
Joe Onorato48bd6f52016-04-06 14:48:30 -07001# Print a list of the modules that could be built
2
3MODULE_INFO_JSON := $(PRODUCT_OUT)/module-info.json
4
5$(MODULE_INFO_JSON):
6 @echo Generating $@
7 $(hide) echo -ne '{\n ' > $@
8 $(hide) echo -ne $(foreach m, $(sort $(ALL_MODULES)), \
9 ' "$(m)": {' \
10 '"class": [$(foreach w,$(sort $(ALL_MODULES.$(m).CLASS)),"$(w)", )], ' \
11 '"path": [$(foreach w,$(sort $(ALL_MODULES.$(m).PATH)),"$(w)", )], ' \
12 '"tags": [$(foreach w,$(sort $(ALL_MODULES.$(m).TAGS)),"$(w)", )], ' \
13 '"installed": [$(foreach w,$(sort $(ALL_MODULES.$(m).INSTALLED)),"$(w)", )], ' \
Kevin Cheng22609182017-11-28 15:04:40 -080014 '"compatibility_suites": [$(foreach w,$(sort $(ALL_MODULES.$(m).COMPATIBILITY_SUITES)),"$(w)", )], ' \
Dan Shiefb892d2017-12-06 15:57:31 -080015 '"auto_test_config": [$(ALL_MODULES.$(m).auto_test_config)], ' \
yangbillf90b7342018-08-28 20:40:42 +080016 '"module_name": "$(ALL_MODULES.$(m).MODULE_NAME)", ' \
yangbillc9347b32018-08-23 23:04:37 +080017 '"test_config": [$(if $(ALL_MODULES.$(m).TEST_CONFIG),"$(ALL_MODULES.$(m).TEST_CONFIG)")], ' \
Brandon Lee5568c192018-09-12 17:39:32 +080018 '"dependencies": [$(foreach w,$(sort $(ALL_DEPS.$(m).ALL_DEPS)),"$(w)", )], ' \
19 '"srcs": [$(foreach w,$(sort $(ALL_MODULES.$(m).SRCS)),"$(w)", )], ' \
patricktuab435e32019-05-10 15:34:26 +080020 '"srcjars": [$(foreach w,$(sort $(ALL_MODULES.$(m).SRCJARS)),"$(w)", )], ' \
Joe Onorato48bd6f52016-04-06 14:48:30 -070021 '},\n' \
22 ) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@
23 $(hide) echo '}' >> $@
24
25
26# If ONE_SHOT_MAKEFILE is set, our view of the world is smaller, so don't
27# rewrite the file in that came.
28ifndef ONE_SHOT_MAKEFILE
Dan Willemsen3b6f6fe2019-01-14 21:46:31 -080029droidcore: $(MODULE_INFO_JSON)
Joe Onorato48bd6f52016-04-06 14:48:30 -070030endif
31
Simran Basi03f52532018-09-06 12:23:11 -070032$(call dist-for-goals, general-tests, $(MODULE_INFO_JSON))