Merge "Statically link libwinpthread into windows binaries."
diff --git a/core/Makefile b/core/Makefile
index 169def8..9e82bfc 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1753,9 +1753,13 @@
$(HOST_OUT_EXECUTABLES)/brillo_update_payload \
$(HOST_OUT_EXECUTABLES)/lib/shflags/shflags \
$(HOST_OUT_EXECUTABLES)/delta_generator \
- $(BLK_ALLOC_TO_BASE_FS) \
+ $(BLK_ALLOC_TO_BASE_FS)
+
+ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT))
+OTATOOLS += \
$(FUTILITY) \
$(VBOOT_SIGNER)
+endif
# Shared libraries.
OTATOOLS += \
@@ -1794,12 +1798,15 @@
$(BUILT_OTATOOLS_PACKAGE): $(OTATOOLS) | $(ACP)
@echo "Package OTA tools: $@"
$(hide) rm -rf $@ $(zip_root)
- $(hide) mkdir -p $(dir $@) $(zip_root)/bin $(zip_root)/framework $(zip_root)/releasetools $(zip_root)/system/extras/verity $(zip_root)/external/vboot_reference/tests/devkeys
+ $(hide) mkdir -p $(dir $@) $(zip_root)/bin $(zip_root)/framework $(zip_root)/releasetools $(zip_root)/system/extras/verity
$(call copy-files-with-structure,$(OTATOOLS),$(HOST_OUT)/,$(zip_root))
$(hide) $(ACP) $(HOST_OUT_JAVA_LIBRARIES)/VeritySigner.jar $(zip_root)/framework/
$(hide) $(ACP) -p system/extras/verity/build_verity_metadata.py $(zip_root)/system/extras/verity/
- $(hide) $(ACP) -p -r external/vboot_reference/tests/devkeys/* $(zip_root)/external/vboot_reference/tests/devkeys
$(hide) $(ACP) -r -d -p build/tools/releasetools/* $(zip_root)/releasetools
+ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT))
+ $(hide) mkdir -p $(zip_root)/external/vboot_reference/tests/devkeys
+ $(hide) $(ACP) -r -d -p external/vboot_reference/tests/devkeys/* $(zip_root)/external/vboot_reference/tests/devkeys
+endif
$(hide) rm -rf $@ $(zip_root)/releasetools/*.pyc
$(hide) (cd $(zip_root) && zip -qryX $(abspath $@) *)
$(hide) zip -qryX $(abspath $@) build/target/product/security/
diff --git a/core/definitions.mk b/core/definitions.mk
index 750c329..556b41f 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -3243,6 +3243,11 @@
#$(warning 42 == $(call math_max,5,42))
#$(warning 42 == $(call math_max,42,5))
+# $1 is the variable name to increment
+define inc_and_print
+$(strip $(eval $(1) := $($(1)) .)$(words $($(1))))
+endef
+
###########################################################
## Other includes
###########################################################
diff --git a/core/main.mk b/core/main.mk
index c131ed2..85f5d6c 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -551,8 +551,10 @@
#
subdir_makefiles := $(SOONG_ANDROID_MK) $(call first-makefiles-under,$(TOP))
+subdir_makefiles_total := $(words $(subdir_makefiles))
+.KATI_READONLY := subdir_makefiles_total
-$(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
+$(foreach mk,$(subdir_makefiles),$(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] including $(mk) ...)$(eval include $(mk)))
ifdef PDK_FUSION_PLATFORM_ZIP
# Bring in the PDK platform.zip modules.