The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2007 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 | # |
| 18 | # Functions for including AndroidProducts.mk files |
Ying Wang | 157a5e1 | 2012-09-27 13:26:25 -0700 | [diff] [blame] | 19 | # PRODUCT_MAKEFILES is set up in AndroidProducts.mks. |
| 20 | # Format of PRODUCT_MAKEFILES: |
| 21 | # <product_name>:<path_to_the_product_makefile> |
| 22 | # If the <product_name> is the same as the base file name (without dir |
| 23 | # and the .mk suffix) of the product makefile, "<product_name>:" can be |
| 24 | # omitted. |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 25 | |
Ying Wang | 7dfdb84 | 2016-03-03 20:57:21 -0800 | [diff] [blame] | 26 | # Search for AndroidProducts.mks in the given dir. |
| 27 | # $(1): the path to the dir |
| 28 | define _search-android-products-files-in-dir |
| 29 | $(sort $(shell test -d $(1) && find -L $(1) \ |
| 30 | -maxdepth 6 \ |
| 31 | -name .git -prune \ |
| 32 | -o -name AndroidProducts.mk -print)) |
| 33 | endef |
| 34 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 35 | # |
| 36 | # Returns the list of all AndroidProducts.mk files. |
| 37 | # $(call ) isn't necessary. |
| 38 | # |
| 39 | define _find-android-products-files |
Ying Wang | 7dfdb84 | 2016-03-03 20:57:21 -0800 | [diff] [blame] | 40 | $(foreach d, device vendor product,$(call _search-android-products-files-in-dir,$(d))) \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 41 | $(SRC_TARGET_DIR)/product/AndroidProducts.mk |
| 42 | endef |
| 43 | |
| 44 | # |
Ying Wang | 1a031e4 | 2010-05-10 16:35:39 -0700 | [diff] [blame] | 45 | # Returns the sorted concatenation of PRODUCT_MAKEFILES |
| 46 | # variables set in the given AndroidProducts.mk files. |
| 47 | # $(1): the list of AndroidProducts.mk files. |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 48 | # |
Ying Wang | 1a031e4 | 2010-05-10 16:35:39 -0700 | [diff] [blame] | 49 | define get-product-makefiles |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 50 | $(sort \ |
Ying Wang | 1a031e4 | 2010-05-10 16:35:39 -0700 | [diff] [blame] | 51 | $(foreach f,$(1), \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 52 | $(eval PRODUCT_MAKEFILES :=) \ |
| 53 | $(eval LOCAL_DIR := $(patsubst %/,%,$(dir $(f)))) \ |
| 54 | $(eval include $(f)) \ |
| 55 | $(PRODUCT_MAKEFILES) \ |
| 56 | ) \ |
| 57 | $(eval PRODUCT_MAKEFILES :=) \ |
| 58 | $(eval LOCAL_DIR :=) \ |
| 59 | ) |
| 60 | endef |
| 61 | |
| 62 | # |
Ying Wang | 1a031e4 | 2010-05-10 16:35:39 -0700 | [diff] [blame] | 63 | # Returns the sorted concatenation of all PRODUCT_MAKEFILES |
| 64 | # variables set in all AndroidProducts.mk files. |
| 65 | # $(call ) isn't necessary. |
| 66 | # |
| 67 | define get-all-product-makefiles |
| 68 | $(call get-product-makefiles,$(_find-android-products-files)) |
| 69 | endef |
| 70 | |
| 71 | # |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 72 | # Functions for including product makefiles |
| 73 | # |
| 74 | |
| 75 | _product_var_list := \ |
| 76 | PRODUCT_NAME \ |
| 77 | PRODUCT_MODEL \ |
| 78 | PRODUCT_LOCALES \ |
Ying Wang | 4f1ab92 | 2011-03-15 13:19:30 -0700 | [diff] [blame] | 79 | PRODUCT_AAPT_CONFIG \ |
Dianne Hackborn | a0f464a | 2011-10-14 19:37:57 -0700 | [diff] [blame] | 80 | PRODUCT_AAPT_PREF_CONFIG \ |
Ying Wang | 6068658 | 2014-12-10 12:40:09 -0800 | [diff] [blame] | 81 | PRODUCT_AAPT_PREBUILT_DPI \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 82 | PRODUCT_PACKAGES \ |
Joe Onorato | d7d0afc | 2012-06-05 15:54:09 -0700 | [diff] [blame] | 83 | PRODUCT_PACKAGES_DEBUG \ |
| 84 | PRODUCT_PACKAGES_ENG \ |
| 85 | PRODUCT_PACKAGES_TESTS \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 86 | PRODUCT_DEVICE \ |
| 87 | PRODUCT_MANUFACTURER \ |
| 88 | PRODUCT_BRAND \ |
| 89 | PRODUCT_PROPERTY_OVERRIDES \ |
Mike Lockwood | 0d23fec | 2011-06-09 14:54:40 -0700 | [diff] [blame] | 90 | PRODUCT_DEFAULT_PROPERTY_OVERRIDES \ |
Joe Onorato | 700b88e | 2010-10-05 17:33:58 -0400 | [diff] [blame] | 91 | PRODUCT_CHARACTERISTICS \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 92 | PRODUCT_COPY_FILES \ |
| 93 | PRODUCT_OTA_PUBLIC_KEYS \ |
Doug Zongker | 5d4808d | 2011-03-16 07:49:13 -0700 | [diff] [blame] | 94 | PRODUCT_EXTRA_RECOVERY_KEYS \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 95 | PRODUCT_PACKAGE_OVERLAYS \ |
| 96 | DEVICE_PACKAGE_OVERLAYS \ |
Ying Wang | 780128a | 2014-01-29 13:35:55 -0800 | [diff] [blame] | 97 | PRODUCT_SDK_ATREE_FILES \ |
Joe Onorato | 214a42b | 2009-04-09 20:36:06 -0700 | [diff] [blame] | 98 | PRODUCT_SDK_ADDON_NAME \ |
| 99 | PRODUCT_SDK_ADDON_COPY_FILES \ |
| 100 | PRODUCT_SDK_ADDON_COPY_MODULES \ |
Ying Wang | a032d3d | 2011-11-11 10:52:12 -0800 | [diff] [blame] | 101 | PRODUCT_SDK_ADDON_DOC_MODULES \ |
Raphael Moll | 0d7d09a | 2014-08-21 15:22:08 -0700 | [diff] [blame] | 102 | PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP \ |
Ying Wang | 3c21fe5 | 2011-10-04 10:50:08 -0700 | [diff] [blame] | 103 | PRODUCT_DEFAULT_WIFI_CHANNELS \ |
| 104 | PRODUCT_DEFAULT_DEV_CERTIFICATE \ |
Ying Wang | dbb31be | 2011-12-09 15:11:57 -0800 | [diff] [blame] | 105 | PRODUCT_RESTRICT_VENDOR_FILES \ |
Dima Zavin | f926990 | 2012-03-16 09:57:11 -0700 | [diff] [blame] | 106 | PRODUCT_VENDOR_KERNEL_HEADERS \ |
Geremy Condra | fd6f751 | 2013-06-16 17:26:08 -0700 | [diff] [blame] | 107 | PRODUCT_BOOT_JARS \ |
Sami Tolvanen | 8b3f08b | 2015-04-07 15:08:59 +0100 | [diff] [blame] | 108 | PRODUCT_SUPPORTS_BOOT_SIGNER \ |
David Riley | 17be3d3 | 2015-03-03 08:54:11 -0800 | [diff] [blame] | 109 | PRODUCT_SUPPORTS_VBOOT \ |
Geremy Condra | fd6f751 | 2013-06-16 17:26:08 -0700 | [diff] [blame] | 110 | PRODUCT_SUPPORTS_VERITY \ |
Sami Tolvanen | f99b531 | 2015-05-20 07:30:57 +0100 | [diff] [blame] | 111 | PRODUCT_SUPPORTS_VERITY_FEC \ |
Jeff Sharkey | 26d22f7 | 2014-03-18 17:20:10 -0700 | [diff] [blame] | 112 | PRODUCT_OEM_PROPERTIES \ |
| 113 | PRODUCT_SYSTEM_PROPERTY_BLACKLIST \ |
Narayan Kamath | 89ec496 | 2014-08-05 14:51:08 +0100 | [diff] [blame] | 114 | PRODUCT_SYSTEM_SERVER_JARS \ |
David Riley | 17be3d3 | 2015-03-03 08:54:11 -0800 | [diff] [blame] | 115 | PRODUCT_VBOOT_SIGNING_KEY \ |
Furquan Shaikh | e8c2122 | 2015-08-07 11:58:05 -0700 | [diff] [blame] | 116 | PRODUCT_VBOOT_SIGNING_SUBKEY \ |
Geremy Condra | 5b5f495 | 2014-05-05 22:19:37 -0700 | [diff] [blame] | 117 | PRODUCT_VERITY_SIGNING_KEY \ |
Daniel Rosenberg | f4eabc3 | 2014-07-10 15:42:38 -0700 | [diff] [blame] | 118 | PRODUCT_SYSTEM_VERITY_PARTITION \ |
Ying Wang | 8755756 | 2014-10-09 19:29:53 -0700 | [diff] [blame] | 119 | PRODUCT_VENDOR_VERITY_PARTITION \ |
Ying Wang | 20ebd2e | 2014-10-07 18:07:23 -0700 | [diff] [blame] | 120 | PRODUCT_DEX_PREOPT_MODULE_CONFIGS \ |
| 121 | PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \ |
| 122 | PRODUCT_DEX_PREOPT_BOOT_FLAGS \ |
Andreas Gampe | 6b30d77 | 2016-06-27 15:15:31 -0700 | [diff] [blame] | 123 | PRODUCT_SANITIZER_MODULE_CONFIGS \ |
Mohamad Ayyash | 1868a60 | 2016-04-22 17:22:07 -0700 | [diff] [blame] | 124 | PRODUCT_SYSTEM_BASE_FS_PATH \ |
| 125 | PRODUCT_VENDOR_BASE_FS_PATH \ |
Gustav Sennton | 81ee186 | 2016-05-27 14:07:54 +0100 | [diff] [blame] | 126 | PRODUCT_SHIPPING_API_LEVEL \ |
Hung-ying Tyan | 3c054d8 | 2016-05-20 19:08:30 +0800 | [diff] [blame] | 127 | VENDOR_PRODUCT_RESTRICT_VENDOR_FILES \ |
| 128 | VENDOR_EXCEPTION_MODULES \ |
| 129 | VENDOR_EXCEPTION_PATHS \ |
| 130 | |
Mohamad Ayyash | 1868a60 | 2016-04-22 17:22:07 -0700 | [diff] [blame] | 131 | |
Ying Wang | 20ebd2e | 2014-10-07 18:07:23 -0700 | [diff] [blame] | 132 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 133 | define dump-product |
| 134 | $(info ==== $(1) ====)\ |
| 135 | $(foreach v,$(_product_var_list),\ |
| 136 | $(info PRODUCTS.$(1).$(v) := $(PRODUCTS.$(1).$(v))))\ |
| 137 | $(info --------) |
| 138 | endef |
| 139 | |
| 140 | define dump-products |
| 141 | $(foreach p,$(PRODUCTS),$(call dump-product,$(p))) |
| 142 | endef |
| 143 | |
| 144 | # |
| 145 | # $(1): product to inherit |
| 146 | # |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 147 | # Does three things: |
| 148 | # 1. Inherits all of the variables from $1. |
| 149 | # 2. Records the inheritance in the .INHERITS_FROM variable |
| 150 | # 3. Records that we've visited this node, in ALL_PRODUCTS |
| 151 | # |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 152 | define inherit-product |
Ying Wang | a174261 | 2015-10-28 14:33:40 -0700 | [diff] [blame] | 153 | $(if $(findstring ../,$(1)),\ |
| 154 | $(eval np := $(call normalize-paths,$(1))),\ |
| 155 | $(eval np := $(strip $(1))))\ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 156 | $(foreach v,$(_product_var_list), \ |
Ying Wang | a174261 | 2015-10-28 14:33:40 -0700 | [diff] [blame] | 157 | $(eval $(v) := $($(v)) $(INHERIT_TAG)$(np))) \ |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 158 | $(eval inherit_var := \ |
| 159 | PRODUCTS.$(strip $(word 1,$(_include_stack))).INHERITS_FROM) \ |
Ying Wang | a174261 | 2015-10-28 14:33:40 -0700 | [diff] [blame] | 160 | $(eval $(inherit_var) := $(sort $($(inherit_var)) $(np))) \ |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 161 | $(eval inherit_var:=) \ |
| 162 | $(eval ALL_PRODUCTS := $(sort $(ALL_PRODUCTS) $(word 1,$(_include_stack)))) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 163 | endef |
| 164 | |
Joe Onorato | 28a846d | 2010-02-22 10:33:05 -0800 | [diff] [blame] | 165 | |
| 166 | # |
| 167 | # Do inherit-product only if $(1) exists |
| 168 | # |
| 169 | define inherit-product-if-exists |
| 170 | $(if $(wildcard $(1)),$(call inherit-product,$(1)),) |
| 171 | endef |
| 172 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 173 | # |
| 174 | # $(1): product makefile list |
| 175 | # |
| 176 | #TODO: check to make sure that products have all the necessary vars defined |
| 177 | define import-products |
| 178 | $(call import-nodes,PRODUCTS,$(1),$(_product_var_list)) |
| 179 | endef |
| 180 | |
| 181 | |
| 182 | # |
| 183 | # Does various consistency checks on all of the known products. |
| 184 | # Takes no parameters, so $(call ) is not necessary. |
| 185 | # |
| 186 | define check-all-products |
| 187 | $(if ,, \ |
| 188 | $(eval _cap_names :=) \ |
| 189 | $(foreach p,$(PRODUCTS), \ |
| 190 | $(eval pn := $(strip $(PRODUCTS.$(p).PRODUCT_NAME))) \ |
| 191 | $(if $(pn),,$(error $(p): PRODUCT_NAME must be defined.)) \ |
| 192 | $(if $(filter $(pn),$(_cap_names)), \ |
| 193 | $(error $(p): PRODUCT_NAME must be unique; "$(pn)" already used by $(strip \ |
| 194 | $(foreach \ |
| 195 | pp,$(PRODUCTS), |
| 196 | $(if $(filter $(pn),$(PRODUCTS.$(pp).PRODUCT_NAME)), \ |
| 197 | $(pp) \ |
| 198 | ))) \ |
| 199 | ) \ |
| 200 | ) \ |
| 201 | $(eval _cap_names += $(pn)) \ |
| 202 | $(if $(call is-c-identifier,$(pn)),, \ |
| 203 | $(error $(p): PRODUCT_NAME must be a valid C identifier, not "$(pn)") \ |
| 204 | ) \ |
| 205 | $(eval pb := $(strip $(PRODUCTS.$(p).PRODUCT_BRAND))) \ |
| 206 | $(if $(pb),,$(error $(p): PRODUCT_BRAND must be defined.)) \ |
| 207 | $(foreach cf,$(strip $(PRODUCTS.$(p).PRODUCT_COPY_FILES)), \ |
Ying Wang | 4b0486b | 2012-09-20 16:35:36 -0700 | [diff] [blame] | 208 | $(if $(filter 2 3,$(words $(subst :,$(space),$(cf)))),, \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 209 | $(error $(p): malformed COPY_FILE "$(cf)") \ |
| 210 | ) \ |
| 211 | ) \ |
| 212 | ) \ |
| 213 | ) |
| 214 | endef |
| 215 | |
| 216 | |
| 217 | # |
| 218 | # Returns the product makefile path for the product with the provided name |
| 219 | # |
| 220 | # $(1): short product name like "generic" |
| 221 | # |
| 222 | define _resolve-short-product-name |
| 223 | $(eval pn := $(strip $(1))) |
| 224 | $(eval p := \ |
| 225 | $(foreach p,$(PRODUCTS), \ |
| 226 | $(if $(filter $(pn),$(PRODUCTS.$(p).PRODUCT_NAME)), \ |
| 227 | $(p) \ |
| 228 | )) \ |
| 229 | ) |
| 230 | $(eval p := $(sort $(p))) |
| 231 | $(if $(filter 1,$(words $(p))), \ |
| 232 | $(p), \ |
| 233 | $(if $(filter 0,$(words $(p))), \ |
| 234 | $(error No matches for product "$(pn)"), \ |
| 235 | $(error Product "$(pn)" ambiguous: matches $(p)) \ |
| 236 | ) \ |
| 237 | ) |
| 238 | endef |
| 239 | define resolve-short-product-name |
| 240 | $(strip $(call _resolve-short-product-name,$(1))) |
| 241 | endef |
Joe Onorato | 8dc8faa | 2010-09-14 13:09:48 -0400 | [diff] [blame] | 242 | |
| 243 | |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 244 | _product_stash_var_list := $(_product_var_list) \ |
Ying Wang | 0650d15 | 2013-07-23 17:57:38 -0700 | [diff] [blame] | 245 | PRODUCT_BOOTCLASSPATH \ |
Narayan Kamath | 89ec496 | 2014-08-05 14:51:08 +0100 | [diff] [blame] | 246 | PRODUCT_SYSTEM_SERVER_CLASSPATH \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 247 | TARGET_ARCH \ |
| 248 | TARGET_ARCH_VARIANT \ |
Ben Cheng | 7028f5e | 2013-01-15 14:36:42 -0800 | [diff] [blame] | 249 | TARGET_CPU_VARIANT \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 250 | TARGET_BOARD_PLATFORM \ |
| 251 | TARGET_BOARD_PLATFORM_GPU \ |
Dima Zavin | f926990 | 2012-03-16 09:57:11 -0700 | [diff] [blame] | 252 | TARGET_BOARD_KERNEL_HEADERS \ |
| 253 | TARGET_DEVICE_KERNEL_HEADERS \ |
| 254 | TARGET_PRODUCT_KERNEL_HEADERS \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 255 | TARGET_BOOTLOADER_BOARD_NAME \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 256 | TARGET_NO_BOOTLOADER \ |
| 257 | TARGET_NO_KERNEL \ |
| 258 | TARGET_NO_RECOVERY \ |
| 259 | TARGET_NO_RADIOIMAGE \ |
| 260 | TARGET_HARDWARE_3D \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 261 | TARGET_CPU_ABI \ |
| 262 | TARGET_CPU_ABI2 \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 263 | |
| 264 | |
| 265 | _product_stash_var_list += \ |
| 266 | BOARD_WPA_SUPPLICANT_DRIVER \ |
| 267 | BOARD_WLAN_DEVICE \ |
| 268 | BOARD_USES_GENERIC_AUDIO \ |
| 269 | BOARD_KERNEL_CMDLINE \ |
| 270 | BOARD_KERNEL_BASE \ |
| 271 | BOARD_HAVE_BLUETOOTH \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 272 | BOARD_VENDOR_USE_AKMD \ |
| 273 | BOARD_EGL_CFG \ |
| 274 | BOARD_BOOTIMAGE_PARTITION_SIZE \ |
| 275 | BOARD_RECOVERYIMAGE_PARTITION_SIZE \ |
| 276 | BOARD_SYSTEMIMAGE_PARTITION_SIZE \ |
Mohamad Ayyash | 6894695 | 2015-03-03 12:30:37 -0800 | [diff] [blame] | 277 | BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE \ |
JP Abgrall | 5bfed5a | 2014-06-16 14:17:40 -0700 | [diff] [blame] | 278 | BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 279 | BOARD_USERDATAIMAGE_PARTITION_SIZE \ |
Ying Wang | 9f8e8db | 2011-11-04 11:37:01 -0700 | [diff] [blame] | 280 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE \ |
| 281 | BOARD_CACHEIMAGE_PARTITION_SIZE \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 282 | BOARD_FLASH_BLOCK_SIZE \ |
Daniel Rosenberg | dde3184 | 2014-05-28 13:51:53 -0700 | [diff] [blame] | 283 | BOARD_VENDORIMAGE_PARTITION_SIZE \ |
| 284 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE \ |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 285 | BOARD_INSTALLER_CMDLINE \ |
| 286 | |
| 287 | |
Ying Wang | 3c21fe5 | 2011-10-04 10:50:08 -0700 | [diff] [blame] | 288 | _product_stash_var_list += \ |
Ying Wang | 9c44021 | 2014-05-01 20:55:30 -0700 | [diff] [blame] | 289 | DEFAULT_SYSTEM_DEV_CERTIFICATE \ |
Alex Light | 7326f7b | 2014-08-04 17:09:41 -0700 | [diff] [blame] | 290 | WITH_DEXPREOPT \ |
| 291 | WITH_DEXPREOPT_BOOT_IMG_ONLY |
Ying Wang | 3c21fe5 | 2011-10-04 10:50:08 -0700 | [diff] [blame] | 292 | |
Joe Onorato | 8dc8faa | 2010-09-14 13:09:48 -0400 | [diff] [blame] | 293 | # |
Dan Willemsen | c1f17ff | 2016-10-05 16:57:27 -0700 | [diff] [blame] | 294 | # Mark the variables in _product_stash_var_list as readonly |
Joe Onorato | 8dc8faa | 2010-09-14 13:09:48 -0400 | [diff] [blame] | 295 | # |
Dan Willemsen | c1f17ff | 2016-10-05 16:57:27 -0700 | [diff] [blame] | 296 | define readonly-product-vars |
Ying Wang | f9953b4 | 2010-12-29 14:07:38 -0800 | [diff] [blame] | 297 | $(foreach v,$(_product_stash_var_list), \ |
Dan Willemsen | c1f17ff | 2016-10-05 16:57:27 -0700 | [diff] [blame] | 298 | $(eval $(v) ?=) \ |
| 299 | $(eval .KATI_READONLY := $(v)) \ |
Joe Onorato | 8dc8faa | 2010-09-14 13:09:48 -0400 | [diff] [blame] | 300 | ) |
| 301 | endef |
| 302 | |
Keun young Park | c41c5f4 | 2012-05-30 10:22:29 -0700 | [diff] [blame] | 303 | define add-to-product-copy-files-if-exists |
| 304 | $(if $(wildcard $(word 1,$(subst :, ,$(1)))),$(1)) |
| 305 | endef |
Ying Wang | 20ebd2e | 2014-10-07 18:07:23 -0700 | [diff] [blame] | 306 | |
| 307 | # whitespace placeholder when we record module's dex-preopt config. |
| 308 | _PDPMC_SP_PLACE_HOLDER := |@SP@| |
| 309 | # Set up dex-preopt config for a module. |
| 310 | # $(1) list of module names |
| 311 | # $(2) the modules' dex-preopt config |
| 312 | define add-product-dex-preopt-module-config |
| 313 | $(eval _c := $(subst $(space),$(_PDPMC_SP_PLACE_HOLDER),$(strip $(2))))\ |
| 314 | $(eval PRODUCT_DEX_PREOPT_MODULE_CONFIGS += \ |
| 315 | $(foreach m,$(1),$(m)=$(_c))) |
| 316 | endef |
Andreas Gampe | 6b30d77 | 2016-06-27 15:15:31 -0700 | [diff] [blame] | 317 | |
| 318 | # whitespace placeholder when we record module's sanitizer config. |
| 319 | _PSMC_SP_PLACE_HOLDER := |@SP@| |
| 320 | # Set up sanitizer config for a module. |
| 321 | # $(1) list of module names |
| 322 | # $(2) the modules' sanitizer config |
| 323 | define add-product-sanitizer-module-config |
| 324 | $(eval _c := $(subst $(space),$(_PSMC_SP_PLACE_HOLDER),$(strip $(2))))\ |
| 325 | $(eval PRODUCT_SANITIZER_MODULE_CONFIGS += \ |
| 326 | $(foreach m,$(1),$(m)=$(_c))) |
| 327 | endef |