Travis build failure wasn't working for lint/warn because they didn't
authorJeff Donahue <jeff.donahue@gmail.com>
Sun, 13 Jul 2014 05:37:10 +0000 (22:37 -0700)
committerJeff Donahue <jeff.donahue@gmail.com>
Mon, 14 Jul 2014 09:18:16 +0000 (02:18 -0700)
exit with a non-zero code -- this fixes that.

Makefile

index fc3ffe6..38c180c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -292,10 +292,11 @@ $(EMPTY_LINT_REPORT): $(LINT_OUTPUTS) | $(BUILD_DIR)
        @ if [ -s "$@" ]; then \
                cat $@; \
                mv $@ $(NONEMPTY_LINT_REPORT); \
-         else \
-               $(RM) $(NONEMPTY_LINT_REPORT); \
-               echo "No lint errors!"; \
-         fi
+               echo "Found one or more lint errors."; \
+               exit 1; \
+         fi; \
+         $(RM) $(NONEMPTY_LINT_REPORT); \
+         echo "No lint errors!";
 
 $(LINT_OUTPUTS): $(LINT_OUTPUT_DIR)/%.lint.txt : % | $(LINT_OUTPUT_DIR)
        @ mkdir -p $(dir $@)
@@ -348,10 +349,11 @@ $(EMPTY_WARN_REPORT): $(ALL_WARNS) | $(BUILD_DIR)
        @ if [ -s "$@" ]; then \
                cat $@; \
                mv $@ $(NONEMPTY_WARN_REPORT); \
-         else \
-               $(RM) $(NONEMPTY_WARN_REPORT); \
-               echo "No compiler warnings!"; \
-         fi
+               echo "Found one or more lint errors."; \
+               exit 1; \
+         fi; \
+         $(RM) $(NONEMPTY_WARN_REPORT); \
+         echo "No compiler warnings!";
 
 $(ALL_CXX_WARNS): %.o.$(WARNS_EXT) : %.o