blob: e5e847e177cf303732f48f5db08d063fc1aa5b7c [file] [log] [blame]
Jiyong Parke1346862020-05-18 14:31:30 +09001#
2# Copyright (C) 2020 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# sysprop.mk defines rules for generating <partition>/build.prop files
18
19# -----------------------------------------------------------------
20# property_overrides_split_enabled
21property_overrides_split_enabled :=
22ifeq ($(BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED), true)
23 property_overrides_split_enabled := true
24endif
25
Jiyong Parke1346862020-05-18 14:31:30 +090026BUILDINFO_SH := build/make/tools/buildinfo.sh
Jiyong Parkae556382020-05-20 18:33:43 +090027POST_PROCESS_PROPS := $(HOST_OUT_EXECUTABLES)/post_process_props$(HOST_EXECUTABLE_SUFFIX)
Jiyong Parke1346862020-05-18 14:31:30 +090028
Jiyong Park35a83d12020-05-26 02:01:05 +090029# Emits a set of sysprops common to all partitions to a file.
Jiyong Parke1346862020-05-18 14:31:30 +090030# $(1): Partition name
31# $(2): Output file name
32define generate-common-build-props
Jiyong Park35a83d12020-05-26 02:01:05 +090033 echo "####################################" >> $(2);\
34 echo "# from generate-common-build-props" >> $(2);\
35 echo "# These properties identify this partition image." >> $(2);\
36 echo "####################################" >> $(2);\
37 $(if $(filter system,$(1)),\
38 echo "ro.product.$(1).brand=$(PRODUCT_SYSTEM_BRAND)" >> $(2);\
39 echo "ro.product.$(1).device=$(PRODUCT_SYSTEM_DEVICE)" >> $(2);\
40 echo "ro.product.$(1).manufacturer=$(PRODUCT_SYSTEM_MANUFACTURER)" >> $(2);\
41 echo "ro.product.$(1).model=$(PRODUCT_SYSTEM_MODEL)" >> $(2);\
42 echo "ro.product.$(1).name=$(PRODUCT_SYSTEM_NAME)" >> $(2);\
43 ,\
44 echo "ro.product.$(1).brand=$(PRODUCT_BRAND)" >> $(2);\
45 echo "ro.product.$(1).device=$(TARGET_DEVICE)" >> $(2);\
46 echo "ro.product.$(1).manufacturer=$(PRODUCT_MANUFACTURER)" >> $(2);\
47 echo "ro.product.$(1).model=$(PRODUCT_MODEL)" >> $(2);\
48 echo "ro.product.$(1).name=$(TARGET_PRODUCT)" >> $(2);\
49 )\
50 echo "ro.$(1).build.date=`$(DATE_FROM_FILE)`" >> $(2);\
51 echo "ro.$(1).build.date.utc=`$(DATE_FROM_FILE) +%s`" >> $(2);\
52 echo "ro.$(1).build.fingerprint=$(BUILD_FINGERPRINT_FROM_FILE)" >> $(2);\
53 echo "ro.$(1).build.id=$(BUILD_ID)" >> $(2);\
54 echo "ro.$(1).build.tags=$(BUILD_VERSION_TAGS)" >> $(2);\
55 echo "ro.$(1).build.type=$(TARGET_BUILD_VARIANT)" >> $(2);\
56 echo "ro.$(1).build.version.incremental=$(BUILD_NUMBER_FROM_FILE)" >> $(2);\
57 echo "ro.$(1).build.version.release=$(PLATFORM_VERSION)" >> $(2);\
58 echo "ro.$(1).build.version.sdk=$(PLATFORM_SDK_VERSION)" >> $(2);\
Jiyong Parke1346862020-05-18 14:31:30 +090059
Jiyong Parke1346862020-05-18 14:31:30 +090060endef
61
Jiyong Parke28fa802020-05-26 00:21:20 +090062# Rule for generating <partition>/build.prop file
63#
64# $(1): partition name
65# $(2): path to the output
66# $(3): path to the input *.prop files. The contents of the files are directly
67# emitted to the output
68# $(4): list of variable names each of which contains name=value pairs
69# $(5): optional list of prop names to force remove from the output. Properties from both
70# $(3) and (4) are affected.
71define build-properties
72ALL_DEFAULT_INSTALLED_MODULES += $(2)
73
74# TODO(b/117892318): eliminate the call to uniq-pairs-by-first-component when
75# it is guaranteed that there is no dup.
76$(foreach name,$(strip $(4)),\
77 $(eval _resolved_$(name) := $$(call collapse-pairs, $$(call uniq-pairs-by-first-component,$$($(name)),=)))\
78)
79
Jiyong Park35a83d12020-05-26 02:01:05 +090080$(2): $(POST_PROCESS_PROPS) $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT) $(3)
Jiyong Parke28fa802020-05-26 00:21:20 +090081 $(hide) echo Building $$@
82 $(hide) mkdir -p $$(dir $$@)
83 $(hide) rm -f $$@ && touch $$@
84 $(hide) $$(call generate-common-build-props,$(call to-lower,$(strip $(1))),$$@)
85 $(hide) $(foreach file,$(strip $(3)),\
86 if [ -f "$(file)" ]; then\
87 echo "" >> $$@;\
88 echo "####################################" >> $$@;\
89 echo "# from $(file)" >> $$@;\
90 echo "####################################" >> $$@;\
91 cat $(file) >> $$@;\
92 fi;)
93 $(hide) $(foreach name,$(strip $(4)),\
94 echo "" >> $$@;\
95 echo "####################################" >> $$@;\
96 echo "# from variable $(name)" >> $$@;\
97 echo "####################################" >> $$@;\
98 $$(foreach line,$$(_resolved_$(name)),\
99 echo "$$(line)" >> $$@;\
100 )\
101 )
102 $(hide) $(POST_PROCESS_PROPS) $$@ $(5)
103 $(hide) echo "# end of file" >> $$@
104endef
105
106
Jiyong Parke1346862020-05-18 14:31:30 +0900107# -----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900108# system/build.prop
109#
Jiyong Parke1346862020-05-18 14:31:30 +0900110intermediate_system_build_prop := $(call intermediates-dir-for,ETC,system_build_prop)/build.prop
111INSTALLED_BUILD_PROP_TARGET := $(TARGET_OUT)/build.prop
112ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_BUILD_PROP_TARGET)
113
114# TODO(b/117892318) merge DEFAULT into BUILD
115FINAL_DEFAULT_PROPERTIES := \
Jiyong Parke1346862020-05-18 14:31:30 +0900116 $(call collapse-pairs, $(PRODUCT_SYSTEM_DEFAULT_PROPERTIES))
117FINAL_DEFAULT_PROPERTIES := $(call uniq-pairs-by-first-component, \
118 $(FINAL_DEFAULT_PROPERTIES),=)
119
120FINAL_BUILD_PROPERTIES := \
Jiyong Park57f51f12020-05-18 15:16:55 +0900121 $(call collapse-pairs, $(ADDITIONAL_SYSTEM_PROPERTIES))
122
123# For non-Treble devices, consider vendor properties as system properties
124ifndef property_overrides_split_enabled
125FINAL_BUILD_PROPERTIES += \
126 $(call collapse-pairs, $(ADDITIONAL_VENDOR_PROPERTIES))
127endif
128
Jiyong Parke1346862020-05-18 14:31:30 +0900129FINAL_BUILD_PROPERTIES := $(call uniq-pairs-by-first-component, \
130 $(FINAL_BUILD_PROPERTIES),=)
131
132# A list of arbitrary tags describing the build configuration.
133# Force ":=" so we can use +=
134BUILD_VERSION_TAGS := $(BUILD_VERSION_TAGS)
135ifeq ($(TARGET_BUILD_TYPE),debug)
136 BUILD_VERSION_TAGS += debug
137endif
138# The "test-keys" tag marks builds signed with the old test keys,
139# which are available in the SDK. "dev-keys" marks builds signed with
140# non-default dev keys (usually private keys from a vendor directory).
141# Both of these tags will be removed and replaced with "release-keys"
142# when the target-files is signed in a post-build step.
143ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/make/target/product/security/testkey)
144BUILD_KEYS := test-keys
145else
146BUILD_KEYS := dev-keys
147endif
148BUILD_VERSION_TAGS += $(BUILD_KEYS)
149BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS)))
150
151# A human-readable string that descibes this build in detail.
152build_desc := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER_FROM_FILE) $(BUILD_VERSION_TAGS)
153$(intermediate_system_build_prop): PRIVATE_BUILD_DESC := $(build_desc)
154
155# The string used to uniquely identify the combined build and product; used by the OTA server.
156ifeq (,$(strip $(BUILD_FINGERPRINT)))
157 ifeq ($(strip $(HAS_BUILD_NUMBER)),false)
158 BF_BUILD_NUMBER := $(BUILD_USERNAME)$$($(DATE_FROM_FILE) +%m%d%H%M)
159 else
160 BF_BUILD_NUMBER := $(file <$(BUILD_NUMBER_FILE))
161 endif
162 BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BF_BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
163endif
164# unset it for safety.
165BF_BUILD_NUMBER :=
166
167BUILD_FINGERPRINT_FILE := $(PRODUCT_OUT)/build_fingerprint.txt
168ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_FINGERPRINT) >$(BUILD_FINGERPRINT_FILE) && grep " " $(BUILD_FINGERPRINT_FILE)))
169 $(error BUILD_FINGERPRINT cannot contain spaces: "$(file <$(BUILD_FINGERPRINT_FILE))")
170endif
171BUILD_FINGERPRINT_FROM_FILE := $$(cat $(BUILD_FINGERPRINT_FILE))
172# unset it for safety.
173BUILD_FINGERPRINT :=
174
175# The string used to uniquely identify the system build; used by the OTA server.
176# This purposefully excludes any product-specific variables.
177ifeq (,$(strip $(BUILD_THUMBPRINT)))
178 BUILD_THUMBPRINT := $(PLATFORM_VERSION)/$(BUILD_ID)/$(BUILD_NUMBER_FROM_FILE):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
179endif
180
181BUILD_THUMBPRINT_FILE := $(PRODUCT_OUT)/build_thumbprint.txt
182ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_THUMBPRINT) >$(BUILD_THUMBPRINT_FILE) && grep " " $(BUILD_THUMBPRINT_FILE)))
183 $(error BUILD_THUMBPRINT cannot contain spaces: "$(file <$(BUILD_THUMBPRINT_FILE))")
184endif
185BUILD_THUMBPRINT_FROM_FILE := $$(cat $(BUILD_THUMBPRINT_FILE))
186# unset it for safety.
187BUILD_THUMBPRINT :=
188
189KNOWN_OEM_THUMBPRINT_PROPERTIES := \
190 ro.product.brand \
191 ro.product.name \
192 ro.product.device
193OEM_THUMBPRINT_PROPERTIES := $(filter $(KNOWN_OEM_THUMBPRINT_PROPERTIES),\
194 $(PRODUCT_OEM_PROPERTIES))
195
196# Display parameters shown under Settings -> About Phone
197ifeq ($(TARGET_BUILD_VARIANT),user)
198 # User builds should show:
199 # release build number or branch.buld_number non-release builds
200
201 # Dev. branches should have DISPLAY_BUILD_NUMBER set
202 ifeq (true,$(DISPLAY_BUILD_NUMBER))
203 BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER_FROM_FILE) $(BUILD_KEYS)
204 else
205 BUILD_DISPLAY_ID := $(BUILD_ID) $(BUILD_KEYS)
206 endif
207else
208 # Non-user builds should show detailed build information
209 BUILD_DISPLAY_ID := $(build_desc)
210endif
211
212# Accepts a whitespace separated list of product locales such as
213# (en_US en_AU en_GB...) and returns the first locale in the list with
214# underscores replaced with hyphens. In the example above, this will
215# return "en-US".
216define get-default-product-locale
217$(strip $(subst _,-, $(firstword $(1))))
218endef
219
220# TARGET_BUILD_FLAVOR and ro.build.flavor are used only by the test
221# harness to distinguish builds. Only add _asan for a sanitized build
222# if it isn't already a part of the flavor (via a dedicated lunch
223# config for example).
224TARGET_BUILD_FLAVOR := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)
225ifneq (, $(filter address, $(SANITIZE_TARGET)))
226ifeq (,$(findstring _asan,$(TARGET_BUILD_FLAVOR)))
227TARGET_BUILD_FLAVOR := $(TARGET_BUILD_FLAVOR)_asan
228endif
229endif
230
231ifdef TARGET_SYSTEM_PROP
232system_prop_file := $(TARGET_SYSTEM_PROP)
233else
234system_prop_file := $(wildcard $(TARGET_DEVICE_DIR)/system.prop)
235endif
Jiyong Park35a83d12020-05-26 02:01:05 +0900236$(intermediate_system_build_prop): $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE) $(BUILD_SYSTEM)/version_defaults.mk $(system_prop_file) $(INSTALLED_ANDROID_INFO_TXT_TARGET) $(API_FINGERPRINT) $(POST_PROCESS_PROPS)
Jiyong Parke1346862020-05-18 14:31:30 +0900237 @echo Target buildinfo: $@
238 @mkdir -p $(dir $@)
239 $(hide) rm -f $@ && touch $@
240 $(hide) $(foreach line,$(FINAL_DEFAULT_PROPERTIES), \
241 echo "$(line)" >> $@;)
Jiyong Parke1346862020-05-18 14:31:30 +0900242ifneq ($(PRODUCT_OEM_PROPERTIES),)
243 $(hide) echo "#" >> $@; \
244 echo "# PRODUCT_OEM_PROPERTIES" >> $@; \
245 echo "#" >> $@;
246 $(hide) $(foreach prop,$(PRODUCT_OEM_PROPERTIES), \
247 echo "import /oem/oem.prop $(prop)" >> $@;)
248endif
Jiyong Park35a83d12020-05-26 02:01:05 +0900249 $(hide) $(call generate-common-build-props,system,$@)
Jiyong Parke1346862020-05-18 14:31:30 +0900250 $(hide) TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \
251 TARGET_BUILD_FLAVOR="$(TARGET_BUILD_FLAVOR)" \
252 TARGET_DEVICE="$(TARGET_DEVICE)" \
253 PRODUCT_DEFAULT_LOCALE="$(call get-default-product-locale,$(PRODUCT_LOCALES))" \
254 PRODUCT_DEFAULT_WIFI_CHANNELS="$(PRODUCT_DEFAULT_WIFI_CHANNELS)" \
255 PRIVATE_BUILD_DESC="$(PRIVATE_BUILD_DESC)" \
256 BUILD_ID="$(BUILD_ID)" \
257 BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \
258 DATE="$(DATE_FROM_FILE)" \
259 BUILD_USERNAME="$(BUILD_USERNAME)" \
260 BUILD_HOSTNAME="$(BUILD_HOSTNAME)" \
261 BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \
262 BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \
263 PLATFORM_VERSION="$(PLATFORM_VERSION)" \
264 PLATFORM_VERSION_LAST_STABLE="$(PLATFORM_VERSION_LAST_STABLE)" \
265 PLATFORM_SECURITY_PATCH="$(PLATFORM_SECURITY_PATCH)" \
266 PLATFORM_BASE_OS="$(PLATFORM_BASE_OS)" \
267 PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \
268 PLATFORM_PREVIEW_SDK_VERSION="$(PLATFORM_PREVIEW_SDK_VERSION)" \
269 PLATFORM_PREVIEW_SDK_FINGERPRINT="$$(cat $(API_FINGERPRINT))" \
270 PLATFORM_VERSION_CODENAME="$(PLATFORM_VERSION_CODENAME)" \
271 PLATFORM_VERSION_ALL_CODENAMES="$(PLATFORM_VERSION_ALL_CODENAMES)" \
272 PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION="$(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION)" \
273 BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \
274 $(if $(OEM_THUMBPRINT_PROPERTIES),BUILD_THUMBPRINT="$(BUILD_THUMBPRINT_FROM_FILE)") \
275 TARGET_CPU_ABI_LIST="$(TARGET_CPU_ABI_LIST)" \
276 TARGET_CPU_ABI_LIST_32_BIT="$(TARGET_CPU_ABI_LIST_32_BIT)" \
277 TARGET_CPU_ABI_LIST_64_BIT="$(TARGET_CPU_ABI_LIST_64_BIT)" \
278 TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \
279 TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
280 bash $(BUILDINFO_SH) >> $@
281 $(hide) $(foreach file,$(system_prop_file), \
282 if [ -f "$(file)" ]; then \
283 echo Target buildinfo from: "$(file)"; \
284 echo "" >> $@; \
285 echo "#" >> $@; \
286 echo "# from $(file)" >> $@; \
287 echo "#" >> $@; \
288 cat $(file) >> $@; \
289 echo "# end of $(file)" >> $@; \
290 fi;)
291 $(if $(FINAL_BUILD_PROPERTIES), \
292 $(hide) echo >> $@; \
293 echo "#" >> $@; \
Jiyong Park57f51f12020-05-18 15:16:55 +0900294 echo "# ADDITIONAL_SYSTEM_PROPERTIES" >> $@; \
Jiyong Parke1346862020-05-18 14:31:30 +0900295 echo "#" >> $@; )
296 $(hide) $(foreach line,$(FINAL_BUILD_PROPERTIES), \
297 echo "$(line)" >> $@;)
298 $(hide) $(POST_PROCESS_PROPS) $@ $(PRODUCT_SYSTEM_PROPERTY_BLACKLIST)
299
300build_desc :=
301
302$(INSTALLED_BUILD_PROP_TARGET): $(intermediate_system_build_prop)
303 @echo "Target build info: $@"
304 $(hide) grep -v 'ro.product.first_api_level' $(intermediate_system_build_prop) > $@
305
306# -----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900307# vendor/build.prop
Jiyong Parke1346862020-05-18 14:31:30 +0900308#
Jiyong Parke28fa802020-05-26 00:21:20 +0900309_prop_files_ := $(if $(TARGET_VENDOR_PROP),\
310 $(TARGET_VENDOR_PROP),\
311 $(wildcard $(TARGET_DEVICE_DIR)/vendor.prop))
Jiyong Parke1346862020-05-18 14:31:30 +0900312
Jiyong Park3a2e95a2020-05-25 17:56:09 +0900313android_info_prop := $(call intermediates-dir-for,ETC,android_info_prop)/android_info.prop
314$(android_info_prop): $(INSTALLED_ANDROID_INFO_TXT_TARGET)
315 cat $< | grep 'require version-' | sed -e 's/require version-/ro.build.expect./g' > $@
316
Jiyong Parke28fa802020-05-26 00:21:20 +0900317_prop_files_ += $(android_info_pro)
Jiyong Park3a2e95a2020-05-25 17:56:09 +0900318
Jiyong Parke1346862020-05-18 14:31:30 +0900319ifdef property_overrides_split_enabled
Jiyong Parke28fa802020-05-26 00:21:20 +0900320# Order matters here. When there are duplicates, the last one wins.
321# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
322_prop_vars_ := \
323 ADDITIONAL_VENDOR_PROPERTIES \
324 PRODUCT_PROPERTY_OVERRIDES
Jiyong Parke1346862020-05-18 14:31:30 +0900325else
Jiyong Parke28fa802020-05-26 00:21:20 +0900326_prop_vars_ :=
Jiyong Parke1346862020-05-18 14:31:30 +0900327endif
328
Jiyong Parke28fa802020-05-26 00:21:20 +0900329INSTALLED_VENDOR_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR)/build.prop
330$(eval $(call build-properties,\
331 vendor,\
332 $(INSTALLED_VENDOR_BUILD_PROP_TARGET),\
333 $(_prop_files_),\
334 $(_prop_vars_),\
335 $(PRODUCT_VENDOR_PROPERTY_BLACKLIST)))
Jiyong Parke1346862020-05-18 14:31:30 +0900336
Jiyong Parke28fa802020-05-26 00:21:20 +0900337# -----------------------------------------------------------------
338# product/build.prop
339#
340
341_prop_files_ := $(if $(TARGET_PRODUCT_PROP),\
342 $(TARGET_PRODUCT_PROP),\
343 $(wildcard $(TARGET_DEVICE_DIR)/product.prop))
344
345# Order matters here. When there are duplicates, the last one wins.
346# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
347_prop_vars_ := \
348 ADDITIONAL_PRODUCT_PROPERTIES \
349 PRODUCT_PRODUCT_PROPERTIES
350
351INSTALLED_PRODUCT_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT)/build.prop
352$(eval $(call build-properties,\
353 product,\
354 $(INSTALLED_PRODUCT_BUILD_PROP_TARGET),\
355 $(_prop_files_),\
356 $(_prop_vars_),\
357 $(empty)))
Jiyong Parke1346862020-05-18 14:31:30 +0900358
359# ----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900360# odm/build.prop
361#
362_prop_files_ := $(if $(TARGET_ODM_PROP),\
363 $(TARGET_ODM_PROP),\
364 $(wildcard $(TARGET_DEVICE_DIR)/odm.prop))
Jiyong Parke1346862020-05-18 14:31:30 +0900365
Jiyong Parke28fa802020-05-26 00:21:20 +0900366# Order matters here. When there are duplicates, the last one wins.
367# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
368_prop_vars_ := \
369 ADDITIONAL_ODM_PROPERTIES \
370 PRODUCT_ODM_PROPERTIES
Jiyong Parke1346862020-05-18 14:31:30 +0900371
Jiyong Parke28fa802020-05-26 00:21:20 +0900372INSTALLED_ODM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM)/build.prop
373$(eval $(call build-properties,\
374 odm,\
375 $(INSTALLED_ODM_BUILD_PROP_TARGET),\
376 $(_prop_files),\
377 $(_prop_vars_),\
378 $(empty)))
Jiyong Parke1346862020-05-18 14:31:30 +0900379
380# -----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900381# system_ext/build.prop
382#
383_prop_files_ := $(if $(TARGET_SYSTEM_EXT_PROP),\
384 $(TARGET_SYSTEM_EXT_PROP),\
385 $(wildcard $(TARGET_DEVICE_DIR)/system_ext.prop))
386
387# Order matters here. When there are duplicates, the last one wins.
388# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
389_prop_vars_ := PRODUCT_SYSTEM_EXT_PROPERTIES
390
Jiyong Parke1346862020-05-18 14:31:30 +0900391INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_EXT)/build.prop
Jiyong Parke28fa802020-05-26 00:21:20 +0900392$(eval $(call build-properties,\
393 system_ext,\
394 $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET),\
395 $(_prop_files_),\
396 $(_prop_vars_),\
397 $(empty)))