aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile37
-rw-r--r--src/batchtools/build.mk19
2 files changed, 21 insertions, 35 deletions
diff --git a/Makefile b/Makefile
index 934222e..017649b 100644
--- a/Makefile
+++ b/Makefile
@@ -76,40 +76,7 @@ $(eval $(call subdir,src/js/chrome))
$(eval $(call subdir,src/js/firefox))
$(eval $(call subdir,src/js/tests))
+$(eval $(call subdir,src/batchtools))
+
$(eval $(call subdir,profiles))
$(eval $(call subdir,doc))
-
-
-# Maven Packages ###############################################################
-
-# Don't try to run any of this if maven isn't installed
-MVN_EXE := $(shell which mvn 2>/dev/null)
-ifeq "$(MVN_EXE)" ""
-$(call strict-error,"No maven found unable to run java tests")
-else
-
-# package/install various maven sub-projects
-MVN_TEST_CMD := xvfb-run -a $(MVN_EXE) test
-
-define pkg
-.PHONY: pkg-$1
-pkg-$1:
- cd src/$1 && xvfb-run -a $(MVN_EXE) package
-endef
-
-$(eval $(call pkg,batchtools))
-
-BATCHTOOLS_DIR := src/batchtools
-
-test: test-batchtools
-
-test-batchtools: $(topdir)/fiveui.crx \
- $(topdir)/fiveui.xpi \
- $(topdir)/profiles/chrome \
- $(topdir)/profiles/firefox
- cd $(BATCHTOOLS_DIR) && $(MVN_TEST_CMD)
-
-clean::
- cd $(BATCHTOOLS_DIR) && $(MVN_EXE) clean
-
-endif
diff --git a/src/batchtools/build.mk b/src/batchtools/build.mk
new file mode 100644
index 0000000..8649476
--- /dev/null
+++ b/src/batchtools/build.mk
@@ -0,0 +1,19 @@
+
+mvn-exe := $(shell which mvn 2>/dev/null)
+batchtools-dir := $(path)
+
+ifeq "$(mvn-exe)" ""
+$(call strict-error,"No maven found, unable to run batchtools tests")
+else
+
+test: test-batchtools
+
+.PHONY: test-batchtools
+test-batchtools: $(topdir)/profiles/chrome $(topdir)/profiles/firefox
+ $(call label,BATCHTEST)(cd $(batchtools-dir) \
+ && xvfb-run -a $(mvn-cmd) test)
+
+clean::
+ (cd $(batchtools-dir) && $(mvn-exe) clean)
+
+endif