diff --git a/Android.mk b/Android.mk index 5e94479f69d14e..6cf1fd55e33ff3 100644 --- a/Android.mk +++ b/Android.mk @@ -8,8 +8,11 @@ # which prevents the Android build system from mistakenly loading any other # Android.mk that may exist in the Chromium tree. -ifdef CHROME_ANDROID_BUILD_WEBVIEW -CHROMIUM_WEBVIEW_DIR := $(call my-dir) -include $(CHROMIUM_WEBVIEW_DIR)/GypAndroid.mk -include $(CHROMIUM_WEBVIEW_DIR)/android_webview/Android.mk +CHROMIUM_DIR := $(call my-dir) + +# Assume that if the gyp autogenerated makefile exists, we are doing the +# WebView build using the Android build system. +ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.mk)) +include $(CHROMIUM_DIR)/GypAndroid.mk +include $(CHROMIUM_DIR)/android_webview/Android.mk endif