Fix BUILD_EXECUTABLE. For some reason, module-is-executable didn't work properly.

Change-Id: I657106ca09b4669bd02e9128af869602d83a865c
diff --git a/build/core/build-binary.mk b/build/core/build-binary.mk
index 1de633b..965ac5c 100644
--- a/build/core/build-binary.mk
+++ b/build/core/build-binary.mk
@@ -230,7 +230,7 @@
 #
 # If this is a static library module
 #
-ifeq ($(call module-is-static-library,$(LOCAL_MODULE)),$(true))
+ifeq ($(call module-get-type,$(LOCAL_MODULE)),static-library)
 $(LOCAL_BUILT_MODULE): $(LOCAL_OBJECTS)
 	@ mkdir -p $(dir $@)
 	@ echo "StaticLibrary  : $(PRIVATE_NAME)"
@@ -243,7 +243,7 @@
 #
 # If this is a shared library module
 #
-ifeq ($(call module-is-shared-library,$(LOCAL_MODULE)),$(true))
+ifeq ($(call module-get-type,$(LOCAL_MODULE)),shared-library)
 $(LOCAL_BUILT_MODULE): $(LOCAL_OBJECTS)
 	@ mkdir -p $(dir $@)
 	@ echo "SharedLibrary  : $(PRIVATE_NAME)"
@@ -255,7 +255,7 @@
 #
 # If this is an executable module
 #
-ifeq ($(call module-is-executable,$(LOCAL_MODULE)),$(true))
+ifeq ($(call module-get-type,$(LOCAL_MODULE)),executable)
 $(LOCAL_BUILT_MODULE): $(LOCAL_OBJECTS)
 	@ mkdir -p $(dir $@)
 	@ echo "Executable     : $(PRIVATE_NAME)"
diff --git a/build/core/build-executable.mk b/build/core/build-executable.mk
index 8c67384..a43d8d0 100644
--- a/build/core/build-executable.mk
+++ b/build/core/build-executable.mk
@@ -19,7 +19,6 @@
 
 LOCAL_BUILD_SCRIPT := BUILD_EXECUTABLE
 LOCAL_MAKEFILE     := $(local-makefile)
-LOCAL_IS_HOST_MODULE := false
 
 $(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT))
 $(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE))
diff --git a/build/core/definitions.mk b/build/core/definitions.mk
index 501c322..853023d 100644
--- a/build/core/definitions.mk
+++ b/build/core/definitions.mk
@@ -245,6 +245,8 @@
 # Returns $(true) iff module $1 is of type $2
 module-is-type = $(call seq,$(__ndk_modules.$1.type),$2)
 
+module-get-type = $(__ndk_modules.$1.type)
+
 # Retrieve built location of module $1
 module-get-built = $(__ndk_modules.$1.BUILT_MODULE)