Backed out changeset cc0306c09d59 (bug 914888) for frequent xpcshell failures. a...
[gecko.git] / mobile / android / build.mk
blobe207365e7cd245a08f06bb1a1aaeff19e670bee3
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
7 installer:
8 @$(MAKE) -C mobile/android/installer installer
10 package:
11 @$(MAKE) -C mobile/android/installer
13 fast-package:
14 @$(MAKE) package MOZ_FAST_PACKAGE=1
16 ifeq ($(OS_TARGET),Android)
17 ifneq ($(MOZ_ANDROID_INSTALL_TARGET),)
18 ANDROID_SERIAL = $(MOZ_ANDROID_INSTALL_TARGET)
19 endif
20 ifneq ($(ANDROID_SERIAL),)
21 export ANDROID_SERIAL
22 else
23 # Determine if there's more than one device connected
24 android_devices=$(filter device,$(shell $(ADB) devices))
25 ifeq ($(android_devices),)
26 install::
27 @echo "No devices are connected. Connect a device or start an emulator."
28 @exit 1
29 else
30 ifneq ($(android_devices),device)
31 install::
32 @echo "Multiple devices are connected. Define ANDROID_SERIAL to specify the install target."
33 $(ADB) devices
34 @exit 1
35 endif
36 endif
37 endif
39 install::
40 $(ADB) install -r $(DIST)/$(PKG_PATH)$(PKG_BASENAME).apk
41 else
42 @echo "Mobile can't be installed directly."
43 @exit 1
44 endif
46 deb: package
47 @$(MAKE) -C mobile/android/installer deb
49 upload::
50 @$(MAKE) -C mobile/android/installer upload
52 ifdef ENABLE_TESTS
53 # Implemented in testing/testsuite-targets.mk
55 mochitest-browser-chrome:
56 $(RUN_MOCHITEST) --browser-chrome
57 $(CHECK_TEST_ERROR)
59 mochitest:: mochitest-browser-chrome
61 .PHONY: mochitest-browser-chrome
62 endif
64 ifeq ($(OS_TARGET),Linux)
65 deb: installer
66 endif