make compile: exit with non-zero code on error

This would allow the CI to fail to compilation errors.
This commit is contained in:
Edwin Török 2018-09-09 21:01:53 +01:00
parent 856e4f27e5
commit 575c3cccd9
2 changed files with 5 additions and 2 deletions

View file

@ -103,4 +103,5 @@
"report, please include it!\n\n" "report, please include it!\n\n"
"Emacs outputs to standard error, so you'll need to redirect stderr to\n" "Emacs outputs to standard error, so you'll need to redirect stderr to\n"
"stdout to pipe this to a file or clipboard!\n\n" "stdout to pipe this to a file or clipboard!\n\n"
" e.g. doom -d install 2>&1 | clipboard-program"))))))))) " e.g. doom -d install 2>&1 | clipboard-program"))
(signal 'doom-error e))))))))

View file

@ -151,7 +151,9 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files."
"%s %d/%d file(s) (%d ignored)")) "%s %d/%d file(s) (%d ignored)"))
(if recompile-p "Recompiled" "Compiled") (if recompile-p "Recompiled" "Compiled")
total-ok (- (length target-files) total-noop) total-ok (- (length target-files) total-noop)
total-noop)) total-noop)
(or (= total-fail 0)
(error "Failed to compile some files")))
((debug error) ((debug error)
(print! (red "\nThere were breaking errors.\n\n%s") (print! (red "\nThere were breaking errors.\n\n%s")
"Reverting changes...") "Reverting changes...")