chiark / gitweb /
Makefile: Byte-compile Emacs Lisp files silently.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 13 Aug 2017 03:50:44 +0000 (04:50 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 13 Aug 2017 03:50:44 +0000 (04:50 +0100)
Unless they fail, in which case print the captured log.

Makefile

index 9d7b8a1bb1fb92dcebfc72013ba7a26e62e603fb..8c0aa480a4d28c72d315587a229de58dc4191c76 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -79,9 +79,12 @@ SCRIPTLINKS          += emacsclient-hack movemail-hack sendmail-hack
 SCRIPTLINKS            += aspell-hack emerge-hack
 
 %.elc: %.el $$(foreach e, $$($$*_DEPS), $$(DEP_$$e))
-       $(call v_tag,EMACS)$(EMACS) -L el/ -L $(EMACSLIB) \
+       $(call v_tag,EMACS)if ! $(EMACS) >$*.build-log 2>&1 \
+               -L el/ -L $(EMACSLIB) \
                --batch --no-site-file \
-               --eval '(byte-compile-file "$<")'
+               --eval '(byte-compile-file "$<")'; then \
+         cat $*.build-log; exit 2; \
+       fi
 
 LOCAL_ELISP             = $(filter $(notdir $(wildcard el/*.el)), \
                                $(addsuffix .el, $(ELISP)))