aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Trevor Elliott <trevor@galois.com>2013-06-10 10:51:45 -0700
committerGravatar Trevor Elliott <trevor@galois.com>2013-06-10 10:51:45 -0700
commitf30113e8b3fa07d564cc2f564726f69227b3a9bd (patch)
tree036b6f5c1c3a80d300b8ff33ac1184a55e31fd41
parent9b908f7cbe4325847a149446a369fc76dfdcad53 (diff)
Give the build system the option of failing on warnings
-rw-r--r--Makefile4
-rw-r--r--mk/util.mk5
-rw-r--r--src/js/tests/build.mk4
3 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e4ebf38..a612965 100644
--- a/Makefile
+++ b/Makefile
@@ -84,7 +84,9 @@ $(eval $(call subdir,doc))
# Don't try to run any of this if maven isn't installed
MVN_EXE := $(shell which mvn 2>/dev/null)
-ifneq "$(MVN_EXE)" ""
+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
diff --git a/mk/util.mk b/mk/util.mk
index a92b29a..7449b04 100644
--- a/mk/util.mk
+++ b/mk/util.mk
@@ -28,5 +28,10 @@ quiet_cmd_cp = CP $(call drop-prefix,$@)
cmd_cp = cp $< $@
+ifeq "$(strict)" "1"
+strict-error = $(error $1)
+endif
+
+
print-%:
@echo "$* = $($*)"
diff --git a/src/js/tests/build.mk b/src/js/tests/build.mk
index b49109d..041e207 100644
--- a/src/js/tests/build.mk
+++ b/src/js/tests/build.mk
@@ -7,7 +7,9 @@ clean::
# Jasmine Specs ###############################################################
-ifneq "$(PHANTOM_EXE)" ""
+ifeq "$(PHANTOM_EXE)" ""
+$(call strict-error,"phantomjs not found, unable to run javascript tests")
+else
test: test-js
test-js: