Added target to run byte compilation to gather warnings.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 30 Mar 2017 00:22:53 +0300
changeset 1519 7b320068aa6b
parent 1518 7965eec19342
child 1520 049eff94d357
Added target to run byte compilation to gather warnings.
Makefile
--- a/Makefile	Thu Mar 30 00:13:05 2017 +0300
+++ b/Makefile	Thu Mar 30 00:22:53 2017 +0300
@@ -66,6 +66,7 @@
 # Proj dirs/files.
 
 EL_FILES := $(wildcard *.el)
+ELC_FILES := $(EL_FILES:.el=.elc)
 
 RST_FILES := $(wildcard *.rst)
 HTML_FILES := $(RST_FILES:.rst=.html)
@@ -182,6 +183,18 @@
 	tar cf dot-emacs.tar .emacs .emacs-my
 
 ################################################################
+# Check targets.
+
+.PHONY: check
+check: check-byte-compile
+
+.PHONY: check-byte-compile
+check-byte-compile:
+	\
+$(EMACS) -f package-initialize --eval '(push "." load-path)'  --batch -f batch-byte-compile $(filter-out init.el,$(EL_FILES)) || :
+	rm -f $(ELC_FILES)
+
+################################################################
 # Documentation targets.
 
 .PHONY: html
@@ -198,4 +211,4 @@
 
 .PHONY: clean
 clean:
-	rm -f dot-emacs.tar $(HTML_FILES)
+	rm -f dot-emacs.tar $(HTML_FILES) $(ELC_FILES)