Build .toc when building a module by name

Building a module by name with make <module name>, or with mm or mma
through all_modules, should also build the .toc file so that future uses
of mm on modules that depend on this one can find the .toc file.

Bug: 26936761
Change-Id: Id0c592f0860a10b732b2b5b13c7e967c9bcb1c6b
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 7e33660..fcf3549 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -238,6 +238,8 @@
 
 # Kati adds restat=1 to ninja. GNU make does nothing for this.
 .KATI_RESTAT: $(LOCAL_BUILT_MODULE).toc
+# Build .toc file when using mm, mma, or make $(my_register_name)
+$(my_register_name): $(LOCAL_BUILT_MODULE).toc
 endif
 endif