gecko/build/mobile/robocop/Makefile.in

109 lines
2.9 KiB
Makefile

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
TESTPATH = $(topsrcdir)/mobile/android/base/tests
include $(DEPTH)/config/autoconf.mk
MODULE = robocop
ROBOTIUM_PATH = $(srcdir)/robotium-solo-3.3.jar
JAVAFILES = \
R.java \
_JAVA_HARNESS = \
Actions.java \
Assert.java \
Driver.java \
Element.java \
FennecInstrumentationTestRunner.java \
FennecNativeActions.java \
FennecMochitestAssert.java \
FennecTalosAssert.java \
FennecNativeDriver.java \
FennecNativeElement.java \
RoboCopException.java \
PaintedSurface.java \
$(NULL)
_JAVA_TESTS = $(patsubst $(TESTPATH)/%.in,%,$(wildcard $(TESTPATH)/*.java.in))
_TEST_FILES = \
$(wildcard $(TESTPATH)/*.html) \
$(wildcard $(TESTPATH)/*.sjs) \
$(NULL)
_ROBOCOP_TOOLS = \
$(TESTPATH)/robocop.ini \
parse_ids.py \
$(NULL)
GARBAGE += \
AndroidManifest.xml \
_JAVA_TESTS \
_JAVA_HARNESS \
classes.dex \
robocop.apk \
robocop.ap_ \
robocop-unsigned-unaligned.apk \
robocop-unaligned.apk \
$(NULL)
DEFINES += \
-DANDROID_PACKAGE_NAME=$(ANDROID_PACKAGE_NAME) \
$(NULL)
GARBAGE_DIRS += res
JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar:$(ROBOTIUM_PATH)
include $(topsrcdir)/config/rules.mk
# Override rules.mk java flags with the android specific ones
include $(topsrcdir)/config/android-common.mk
$(_JAVA_HARNESS): % : %.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $< > $@
AndroidManifest.xml: % : %.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $< > $@
$(_JAVA_TESTS): % : $(TESTPATH)/%.in
$(NSINSTALL) -D $(DEPTH)/mobile/android/base/tests
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $< > $(DEPTH)/mobile/android/base/tests/$@
$(_ROBOCOP_TOOLS):
cp $(TESTPATH)/robocop.ini robocop.ini
libs:: $(_TEST_FILES)
$(NSINSTALL) -D $(DEPTH)/_tests/testing/mochitest/tests/robocop
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/robocop/
tools:: robocop.apk
classes.dex: robocop.ap_
classes.dex: $(_ROBOCOP_TOOLS)
classes.dex: $(_JAVA_HARNESS)
classes.dex: $(_JAVA_TESTS)
$(NSINSTALL) -D classes
$(JAVAC) $(JAVAC_FLAGS) -d classes $(JAVAFILES) $(_JAVA_HARNESS) $(addprefix $(DEPTH)/mobile/android/base/tests/,$(_JAVA_TESTS))
$(DX) --dex --output=$@ classes $(ROBOTIUM_PATH) $(ANDROID_COMPT_LIB)
robocop.ap_: AndroidManifest.xml $(TESTPATH)/assets/*
$(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar -I . -S res -A $(TESTPATH)/assets -F $@ -J ./
robocop.apk: robocop.ap_ classes.dex
cp $(TESTPATH)/robocop.ini robocop.ini
cp $(srcdir)/parse_ids.py parse_ids.py
export::
$(NSINSTALL) -D res
@(cd $(srcdir)/res && tar $(TAR_CREATE_FLAGS) - *) | (cd $(DEPTH)/build/mobile/robocop/res && tar -xf -)