Re-org the merge_zips logiic under Turbine rule.

Mac java build has flaky error for merge_zips. The error happend is
because both turbine.jar.premerged and static_java_libs are missing.

We allow one of them can be missing, but we don't allow both of them are
missing. So re-org the merge_zips logic to see if the input of Turbine is
empty or it is due to Turbine internal.

Bug: b/66441248
Test: m clean && m -j32
Change-Id: I3c4b15004fd67fef2b83eabc36841bc8c8ff6e4c
diff --git a/core/definitions.mk b/core/definitions.mk
index 962c0f2..542db3e 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2290,9 +2290,7 @@
     --javacopts $(PRIVATE_JAVACFLAGS) $(COMMON_JDK_FLAGS) \
     $(addprefix --classpath ,$(strip \
         $(call normalize-path-list,$(PRIVATE_ALL_JAVA_HEADER_LIBRARIES)))) \
-    || ( rm -rf $(dir $@)/classes-turbine ; exit 41 ) \
-fi
-$(hide) if [ -s $@.premerged ] ; then \
+    || ( rm -rf $(dir $@)/classes-turbine ; exit 41 ) && \
     $(MERGE_ZIPS) -j -stripDir META-INF $@.tmp $@.premerged $(call reverse-list,$(PRIVATE_STATIC_JAVA_HEADER_LIBRARIES)) ; \
 else \
     $(MERGE_ZIPS) -j -stripDir META-INF $@.tmp $(call reverse-list,$(PRIVATE_STATIC_JAVA_HEADER_LIBRARIES)) ; \