Merge "Add progress indicator to Android.mk includes" am: 353a659a31 am: 100edc4a4c
am: d2445ea0b2
Change-Id: Ib60190f62fc78e261b6d02287bf8f68891bd7d12
diff --git a/core/definitions.mk b/core/definitions.mk
index cb263c3..118aa24 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -3250,6 +3250,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 db15b4c..688247f 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -557,8 +557,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.