Bug 878079 - Clarify |make install| message when no Android devices are connected. r=ted
authorNick Alexander <nalexander@mozilla.com>
Fri, 14 Jun 2013 16:17:42 -0700
changeset 135171 a6d08264b017a6d80f79574f54aaa54165251afa
parent 135170 459cc5f50007139874d78066fbe0f177cb69cf73
child 135172 cd67ffb5ca47e98f48b4fbc5797a38472108ebef
push id1743
push userryanvm@gmail.com
push dateSun, 16 Jun 2013 01:36:46 +0000
treeherderfx-team@36da3cb92193 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs878079
milestone24.0a1
Bug 878079 - Clarify |make install| message when no Android devices are connected. r=ted DONTBUILD since NPOTB
mobile/android/build.mk
--- a/mobile/android/build.mk
+++ b/mobile/android/build.mk
@@ -17,23 +17,29 @@ ifeq ($(OS_TARGET),Android)
 ifneq ($(MOZ_ANDROID_INSTALL_TARGET),)
 ANDROID_SERIAL = $(MOZ_ANDROID_INSTALL_TARGET)
 endif
 ifneq ($(ANDROID_SERIAL),)
 export ANDROID_SERIAL
 else
 # Determine if there's more than one device connected
 android_devices=$(filter device,$(shell $(ANDROID_PLATFORM_TOOLS)/adb devices))
+ifeq ($(android_devices),)
+install::
+	@echo "No devices are connected.  Connect a device or start an emulator."
+	@exit 1
+else
 ifneq ($(android_devices),device)
 install::
 	@echo "Multiple devices are connected. Define ANDROID_SERIAL to specify the install target."
 	$(ANDROID_PLATFORM_TOOLS)/adb devices
 	@exit 1
 endif
 endif
+endif
 
 install::
 	$(ANDROID_PLATFORM_TOOLS)/adb install -r $(DIST)/$(PKG_PATH)$(PKG_BASENAME).apk
 else
 	@echo "Mobile can't be installed directly."
 	@exit 1
 endif