Bug 755206 - Use ANDROID_SERIAL for make install when defined. r=mfinkle

This commit is contained in:
Mike Hommey 2012-05-15 19:01:01 +02:00
parent 39e1457473
commit e4ae0b75f8

View File

@ -76,22 +76,23 @@ fast-package:
@$(MAKE) package MOZ_FAST_PACKAGE=1
ifeq ($(OS_TARGET),Android)
ifeq ($(MOZ_ANDROID_INSTALL_TARGET),)
ifneq ($(MOZ_ANDROID_INSTALL_TARGET),)
ANDROID_SERIAL = $(MOZ_ANDROID_INSTALL_TARGET)
endif
ifeq ($(ANDROID_SERIAL),)
# Determine if there's more than one device connected
android_devices=$(filter device,$(shell $(ANDROID_PLATFORM_TOOLS)/adb devices))
ifneq ($(android_devices),device)
install::
@echo "Multiple devices are connected. Define MOZ_ANDROID_INSTALL_TARGET to specify the install target."
@echo "Multiple devices are connected. Define ANDROID_SERIAL to specify the install target."
$(ANDROID_PLATFORM_TOOLS)/adb devices
@exit 1
else
endif
endif
export ANDROID_SERIAL
install::
$(ANDROID_PLATFORM_TOOLS)/adb install -r $(DIST)/$(PKG_PATH)$(PKG_BASENAME).apk
endif
else
install::
$(ANDROID_PLATFORM_TOOLS)/adb -s $(MOZ_ANDROID_INSTALL_TARGET) install -r $(DIST)/$(PKG_PATH)$(PKG_BASENAME).apk
endif
else
@echo "Mobile can't be installed directly."
@exit 1