michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk michael@0: michael@0: installer: michael@0: @$(MAKE) -C mobile/android/installer installer michael@0: michael@0: package: michael@0: @$(MAKE) -C mobile/android/installer michael@0: michael@0: ifeq ($(OS_TARGET),Android) michael@0: ifneq ($(MOZ_ANDROID_INSTALL_TARGET),) michael@0: ANDROID_SERIAL = $(MOZ_ANDROID_INSTALL_TARGET) michael@0: endif michael@0: ifneq ($(ANDROID_SERIAL),) michael@0: export ANDROID_SERIAL michael@0: else michael@0: # Determine if there's more than one device connected michael@0: android_devices=$(filter device,$(shell $(ADB) devices)) michael@0: ifeq ($(android_devices),) michael@0: install:: michael@0: @echo 'No devices are connected. Connect a device or start an emulator.' michael@0: @exit 1 michael@0: else michael@0: ifneq ($(android_devices),device) michael@0: install:: michael@0: @echo 'Multiple devices are connected. Define ANDROID_SERIAL to specify the install target.' michael@0: $(ADB) devices michael@0: @exit 1 michael@0: endif michael@0: endif michael@0: endif michael@0: michael@0: install:: michael@0: $(ADB) install -r $(DIST)/$(PKG_PATH)$(PKG_BASENAME).apk michael@0: else michael@0: @echo 'Mobile can't be installed directly.' michael@0: @exit 1 michael@0: endif michael@0: michael@0: deb: package michael@0: @$(MAKE) -C mobile/android/installer deb michael@0: michael@0: upload:: michael@0: @$(MAKE) -C mobile/android/installer upload michael@0: michael@0: ifdef ENABLE_TESTS michael@0: # Implemented in testing/testsuite-targets.mk michael@0: michael@0: mochitest-browser-chrome: michael@0: $(RUN_MOCHITEST) --browser-chrome michael@0: $(CHECK_TEST_ERROR) michael@0: michael@0: mochitest:: mochitest-browser-chrome michael@0: michael@0: .PHONY: mochitest-browser-chrome michael@0: endif michael@0: michael@0: ifeq ($(OS_TARGET),Linux) michael@0: deb: installer michael@0: endif