aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Hendrik Tews <hendrik@askra.de>2013-05-22 20:09:27 +0000
committerGravatar Hendrik Tews <hendrik@askra.de>2013-05-22 20:09:27 +0000
commite6769f581c21531b53e4501a57012131c501b750 (patch)
tree086e3b200ef76bbd49b590f125071f13eb9191f2 /Makefile
parent00ba5d0fb4ee7754f095f73621c613cb816c1ce9 (diff)
make warnings non-fatal for normal compilation to fix #458, use
'make check' to get errors
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 24 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2dbff763..be4fd12e 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,8 @@ BIN_SCRIPTS = bin/proofgeneral lego/legotags coq/coqtags isar/isartags
# only during compilation. Another idea: put a function in proof-site
# to output the compile-time load path and ELISP_DIRS so these are set
# just in that one place.
-BYTECOMP = $(BATCHEMACS) -eval '(setq load-path (append (mapcar (lambda (d) (concat "${PWD}/" (symbol-name d))) (quote (${ELISP_DIRS}))) load-path))' -eval '(progn (require (quote bytecomp)) (require (quote mouse)) (require (quote tool-bar)) (require (quote fontset)) (setq byte-compile-warnings (remove (quote cl-functions) (remove (quote noruntime) byte-compile-warning-types))) (setq byte-compile-error-on-warn t))' -f batch-byte-compile
+ERROR_ON_WARN = nil
+BYTECOMP = $(BATCHEMACS) -eval '(setq load-path (append (mapcar (lambda (d) (concat "${PWD}/" (symbol-name d))) (quote (${ELISP_DIRS}))) load-path))' -eval '(progn (require (quote bytecomp)) (require (quote mouse)) (require (quote tool-bar)) (require (quote fontset)) (setq byte-compile-warnings (remove (quote cl-functions) (remove (quote noruntime) byte-compile-warning-types))) (setq byte-compile-error-on-warn $(ERROR_ON_WARN)))' -f batch-byte-compile
EL=$(shell for f in $(ELISP_DIRS); do ls $$f/*.el; done)
ELC=$(EL:.el=.elc)
@@ -78,6 +79,9 @@ FORCE:
## Compiling can show up errors in the code, but be wary of fixing obsoletion
## or argument call warnings unless they're valid for all supported Emacsen.
##
+## The compile target displays errors as warnings only for compatibility
+## with newer Emacs versions (see ticket #458).
+##
compile: $(EL)
@echo "****************************************************************"
@echo " Byte compiling... "
@@ -87,6 +91,25 @@ compile: $(EL)
@echo " Finished."
@echo "****************************************************************"
+##
+## compile : byte compile all lisp files
+##
+## Compiling can show up errors in the code, but be wary of fixing obsoletion
+## or argument call warnings unless they're valid for all supported Emacsen.
+##
+## The check target aborts compilation on any byte-compiler warning.
+## Compile with this target once before commiting your changes to
+## the repository.
+##
+check: $(EL)
+ @echo "****************************************************************"
+ @echo " Byte compiling... "
+ @echo "****************************************************************"
+ $(MAKE) ERROR_ON_WARN=t elc
+ @echo "****************************************************************"
+ @echo " Finished."
+ @echo "****************************************************************"
+
##
## Make an individual .elc. Building separately means we need to be