2024年5月7日发(作者:胡梓珊)
149 $(call get-tagged-modules,tests)
150 $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS))
151)
152# TODO: Remove the 3 places in the tree that use ALL_DEFAULT_INSTALLED_MODULES
153# and get rid of it from this list.
154# TODO: The shell is chosen by magic. Do we still need this?
155modules_to_install := $(sort
156 $(ALL_DEFAULT_INSTALLED_MODULES)
157 $(product_FILES)
158 $(foreach tag,$(tags_to_install),$($(tag)_MODULES))
159 $(call get-tagged-modules, shell_$(TARGET_SHELL))
160 $(CUSTOM_MODULES)
161 )
162# Some packages may override others using LOCAL_OVERRIDES_PACKAGES.
163# Filter out (do not install) any overridden packages.
164overridden_packages := $(call get-package-overrides,$(modules_to_install))
165ifdef overridden_packages
166# old_modules_to_install := $(modules_to_install)
167 modules_to_install :=
168 $(filter-out $(foreach p,$(overridden_packages),$(p) %/$(p).apk),
169 $(modules_to_install))
170endif
171#$(error filtered out
172# $(filter-out $(modules_to_install),$(old_modules_to_install)))
173
174# Don't include any GNU targets in the SDK. It's ok (and necessary)
175# to build the host tools, but nothing that's going to be installed
176# on the target (including static libraries).
177ifdef is_sdk_build
178 target_gnu_MODULES :=
179 $(filter
180 $(TARGET_OUT_INTERMEDIATES)/%
181 $(TARGET_OUT)/%
182 $(TARGET_OUT_DATA)/%,
183 $(sort $(call get-tagged-modules,gnu)))
184 $(info Removing from sdk:)$(foreach d,$(target_gnu_MODULES),$(info : $(d)))
185 modules_to_install :=
186 $(filter-out $(target_gnu_MODULES),$(modules_to_install))
187
188 # Ensure every module listed in PRODUCT_PACKAGES* gets something installed
189 # TODO: Should we do this for all builds and not just the sdk?
190 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES),
191 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,
192 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES has nothing to install!)))
193 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG),
194 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,
195 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_DEBUG has nothing to install!)))
196 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG),
197 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,
198 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_ENG has nothing to install!)))
199 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS),
200 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,
201 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_TESTS has nothing to install!)))
202endif
203
204# Install all of the host modules
205modules_to_install += $(sort $(modules_to_install) $(ALL_HOST_INSTALLED_FILES))
206
207# build/core/Makefile contains extra stuff that we don't want to pollute this
208# top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES
209# contains everything that's built during the current make, but it also further
210# extends ALL_DEFAULT_INSTALLED_MODULES.
211ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_install)
212include $(BUILD_SYSTEM)/Makefile
213modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
214ALL_DEFAULT_INSTALLED_MODULES :=
215
216endif # dont_bother
217# These are additional goals that we build, in order to make sure that there
218# is as little code as possible in the tree that doesn't build.
219modules_to_check := $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).CHECKED))
220
221# If you would like to build all goals, and not skip any intermediate
222# steps, you can pass the "all" modifier goal on the commandline.
223ifneq ($(filter all,$(MAKECMDGOALS)),)
224modules_to_check += $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).BUILT))
225endif
226
227# for easier debugging
228modules_to_check := $(sort $(modules_to_check))
229#$(error modules_to_check $(modules_to_check))
2024年5月7日发(作者:胡梓珊)
149 $(call get-tagged-modules,tests)
150 $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS))
151)
152# TODO: Remove the 3 places in the tree that use ALL_DEFAULT_INSTALLED_MODULES
153# and get rid of it from this list.
154# TODO: The shell is chosen by magic. Do we still need this?
155modules_to_install := $(sort
156 $(ALL_DEFAULT_INSTALLED_MODULES)
157 $(product_FILES)
158 $(foreach tag,$(tags_to_install),$($(tag)_MODULES))
159 $(call get-tagged-modules, shell_$(TARGET_SHELL))
160 $(CUSTOM_MODULES)
161 )
162# Some packages may override others using LOCAL_OVERRIDES_PACKAGES.
163# Filter out (do not install) any overridden packages.
164overridden_packages := $(call get-package-overrides,$(modules_to_install))
165ifdef overridden_packages
166# old_modules_to_install := $(modules_to_install)
167 modules_to_install :=
168 $(filter-out $(foreach p,$(overridden_packages),$(p) %/$(p).apk),
169 $(modules_to_install))
170endif
171#$(error filtered out
172# $(filter-out $(modules_to_install),$(old_modules_to_install)))
173
174# Don't include any GNU targets in the SDK. It's ok (and necessary)
175# to build the host tools, but nothing that's going to be installed
176# on the target (including static libraries).
177ifdef is_sdk_build
178 target_gnu_MODULES :=
179 $(filter
180 $(TARGET_OUT_INTERMEDIATES)/%
181 $(TARGET_OUT)/%
182 $(TARGET_OUT_DATA)/%,
183 $(sort $(call get-tagged-modules,gnu)))
184 $(info Removing from sdk:)$(foreach d,$(target_gnu_MODULES),$(info : $(d)))
185 modules_to_install :=
186 $(filter-out $(target_gnu_MODULES),$(modules_to_install))
187
188 # Ensure every module listed in PRODUCT_PACKAGES* gets something installed
189 # TODO: Should we do this for all builds and not just the sdk?
190 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES),
191 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,
192 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES has nothing to install!)))
193 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG),
194 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,
195 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_DEBUG has nothing to install!)))
196 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG),
197 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,
198 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_ENG has nothing to install!)))
199 $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS),
200 $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,
201 $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_TESTS has nothing to install!)))
202endif
203
204# Install all of the host modules
205modules_to_install += $(sort $(modules_to_install) $(ALL_HOST_INSTALLED_FILES))
206
207# build/core/Makefile contains extra stuff that we don't want to pollute this
208# top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES
209# contains everything that's built during the current make, but it also further
210# extends ALL_DEFAULT_INSTALLED_MODULES.
211ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_install)
212include $(BUILD_SYSTEM)/Makefile
213modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
214ALL_DEFAULT_INSTALLED_MODULES :=
215
216endif # dont_bother
217# These are additional goals that we build, in order to make sure that there
218# is as little code as possible in the tree that doesn't build.
219modules_to_check := $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).CHECKED))
220
221# If you would like to build all goals, and not skip any intermediate
222# steps, you can pass the "all" modifier goal on the commandline.
223ifneq ($(filter all,$(MAKECMDGOALS)),)
224modules_to_check += $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).BUILT))
225endif
226
227# for easier debugging
228modules_to_check := $(sort $(modules_to_check))
229#$(error modules_to_check $(modules_to_check))