add phony target "all_modules" and use it as make goal for "mm"/"mmm"

So that mm/mmm don't depend on phony target "files", which brings in
unwanted files for apps-only build.
Also allow "dist" for mmm.
Bug: http://b/issue?id=2811503

Change-Id: I2c0794aebd1d171d8a0f44eb8cda67855704d6bd
diff --git a/core/main.mk b/core/main.mk
index 0b4ca38..11f234e 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -282,7 +282,6 @@
   ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.dexopt-flags=m=y
 endif
 
-ifeq (,$(TARGET_BUILD_APPS))
 # Install an apns-conf.xml file if one's not already being installed.
 ifeq (,$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES)))
   PRODUCT_COPY_FILES += \
@@ -303,7 +302,6 @@
     endif
   endif
 endif
-endif # !TARGET_BUILD_APPS
 
 ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android
 
@@ -747,6 +745,10 @@
 .PHONY: droid tests
 tests: droidcore
 
+# phony target that include any targets in $(ALL_MODULES)
+.PHONY: all_modules
+all_modules: $(ALL_MODULES)
+
 .PHONY: docs
 docs: $(ALL_DOCS)