OSDN Git Service

mock-ril: fix compiling an issue on Mac OS X
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 26 Jan 2011 09:13:56 +0000 (17:13 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 2 May 2011 10:54:13 +0000 (18:54 +0800)
The $(src_java) and $(gen_src_java) are empty in mock-ril/Android.mk
if the architecuture is not arm, or the build is non-debug variants.
It results in a "find  -name ..." statement with an empty searching
directory by $(call all-java-files-under,...) of librilproto-java.
The BSD derived find on Mac OS X complains about that.

The patch tried to fix the issue in the ways:

* always defines $(src_java) and $(gen_src_java) no matter what TARGET_ARCH is.
* only defines module librilproto-java in debug variants build.

Change-Id: I8a04657d280abc8df1fc3cf95d7143c2225f6ef5

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
mock-ril/Android.mk

index daa8e43..130d84e 100644 (file)
@@ -4,13 +4,9 @@
 
 LOCAL_PATH:= $(call my-dir)
 
-ifeq ($(TARGET_ARCH),arm)
-
 # Mock-ril only buid for debug variants
 ifneq ($(filter userdebug eng tests, $(TARGET_BUILD_VARIANT)),)
 
-include $(CLEAR_VARS)
-
 # Directories of source files
 src_cpp=src/cpp
 src_java=src/java
@@ -25,6 +21,10 @@ gen_src_java=$(src_generated)/java
 gen_src_py=$(src_generated)/python
 gen_src_desc=$(src_generated)/desc
 
+ifeq ($(TARGET_ARCH),arm)
+
+include $(CLEAR_VARS)
+
 LOCAL_SRC_FILES:= \
     $(src_cpp)/ctrl_server.cpp \
     $(src_cpp)/experiments.cpp \
@@ -76,9 +76,7 @@ LOCAL_MODULE:= libmock_ril
 
 include $(BUILD_SHARED_LIBRARY)
 
-endif
-
-endif
+endif # TARGET_ARCH == arm
 
 # Java librilproto
 # =======================================================
@@ -93,3 +91,5 @@ LOCAL_SRC_FILES := $(call all-java-files-under, $(src_java) $(gen_src_java))
 
 include $(BUILD_STATIC_JAVA_LIBRARY)
 # =======================================================
+
+endif # TARGET_BUILD_VARIANT