Bug 1352855 - Only compile AIDL interfaces; r=nalexander
authorJim Chen <nchen@mozilla.com>
Sat, 08 Apr 2017 22:45:51 -0400
changeset 559357 7ca9491181bd1baac40447584a08d2fab075dd46
parent 559356 243cca97ee124621d275d076f3d00b7ed68c3c82
child 559358 c536c2decd20bf8039c0cda7229146f082561b96
push id53058
push userarchaeopteryx@coole-files.de
push dateSun, 09 Apr 2017 21:36:26 +0000
reviewersnalexander
bugs1352855
milestone55.0a1
Bug 1352855 - Only compile AIDL interfaces; r=nalexander .aidl files can contain interfaces or parcelables. Interfaces should be compiled through the aidl tool but parcelables should not. Explicitly list the AIDL interfaces for Fennec, so we only compile the interfaces but not the parcelables.
mobile/android/base/Makefile.in
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -562,35 +562,38 @@ libs:: FennecJNIWrappers.cpp
 	  echo '*****************************************************' && \
 	  exit 1)
 endif
 
 libs:: classes.dex
 	$(INSTALL) classes.dex $(FINAL_TARGET)
 
 # Generate Java binder interfaces from AIDL files.
-aidl_src_path := $(srcdir)/aidl
-aidl_target_path := generated
-media_pkg := org/mozilla/gecko/media
-
-$(aidl_target_path)/$(media_pkg)/%.java:$(aidl_geckoview_src_path)/$(media_pkg)/%.aidl
-	@echo "Processing AIDL: $< => $@"
-	$(AIDL) -p$(ANDROID_SDK)/framework.aidl -I$(aidl_geckoview_src_path) -o$(aidl_target_path) $<
-
 GECKOVIEW_AIDLS = \
   org/mozilla/gecko/IGeckoEditableChild.aidl \
   org/mozilla/gecko/IGeckoEditableParent.aidl \
-  org/mozilla/gecko/media/ICodec.java \
-  org/mozilla/gecko/media/ICodecCallbacks.java \
-  org/mozilla/gecko/media/IMediaDrmBridge.java \
-  org/mozilla/gecko/media/IMediaDrmBridgeCallbacks.java \
-  org/mozilla/gecko/media/IMediaManager.java \
+  org/mozilla/gecko/media/ICodec.aidl \
+  org/mozilla/gecko/media/ICodecCallbacks.aidl \
+  org/mozilla/gecko/media/IMediaDrmBridge.aidl \
+  org/mozilla/gecko/media/IMediaDrmBridgeCallbacks.aidl \
+  org/mozilla/gecko/media/IMediaManager.aidl \
   org/mozilla/gecko/process/IChildProcess.aidl \
   org/mozilla/gecko/process/IProcessManager.aidl \
   $(NULL)
 
 geckoview_aidl_src_path := $(topsrcdir)/mobile/android/geckoview/src/main/aidl
 geckoview_aidl_target_path := generated
-geckoview_aidl_targets := $(addprefix $(geckoview_aidl_target_path)/,$(GECKOVIEW_AIDLS:.aidl=.java))
+geckoview_aidl_targets := $(addprefix $(geckoview_aidl_target_path)/,$($(GECKOVIEW_AIDLS:.java=):.aidl=.java))
 
 $(geckoview_aidl_targets): $(geckoview_aidl_target_path)/%.java: $(geckoview_aidl_src_path)/%.aidl
 	@echo "Processing AIDL: $< => $@"
 	$(AIDL) -p$(ANDROID_SDK)/framework.aidl -I$(geckoview_aidl_src_path) -o$(geckoview_aidl_target_path) $<
+
+FENNEC_AIDLS = \
+  $(NULL)
+
+fennec_aidl_src_path := $(srcdir)/aidl
+fennec_aidl_target_path := generated
+fennec_aidl_targets := $(addprefix $(fennec_aidl_target_path)/,$($(FENNEC_AIDLS:.java=):.aidl=.java))
+
+$(fennec_aidl_targets): $(fennec_aidl_target_path)/%.java: $(fennec_aidl_src_path)/%.aidl
+	@echo "Processing AIDL: $< => $@"
+	$(AIDL) -p$(ANDROID_SDK)/framework.aidl -I$(fennec_aidl_src_path) -I$(geckoview_aidl_src_path) -o$(fennec_aidl_target_path) $<