aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2007-12-14 13:11:29 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2007-12-14 13:11:29 +0000
commit27d45974299078f14f708c77f854610434f7a854 (patch)
treeefb65976c561ee17aa4a712922a5b28f6737157a /Makefile
parent9380826cafa88a7248b24bf0e63e75b8e5a74082 (diff)
Be stricter about byte compilation: compile separately and halt on errors
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 12 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index bbd46c5a..3ffac598 100644
--- a/Makefile
+++ b/Makefile
@@ -49,21 +49,14 @@ PG_SCRIPTS = bin/proofgeneral
# Scripts to install to bin directory
BIN_SCRIPTS = bin/proofgeneral lego/legotags coq/coqtags isar/isartags
-# FIXME: would rather set load path in Elisp,
-# but seems tricky to do 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.
+# Setting load path might be better in Elisp, but seems tricky to do
+# 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))' -f batch-byte-compile
EL=$(shell for f in $(ELISP_DIRS); do ls $$f/*.el; done)
ELC=$(EL:.el=.elc)
-# Some parts of code were not compile safe, because of macros
-# being expanded too early (e.g. proof-defshortcut, easy-menu-define)
-# This should be fixed for 3.5, although careful testing is required.
-BROKENELC=
-
.SUFFIXES: .el .elc
default: all
@@ -80,14 +73,16 @@ FORCE:
compile: .byte-compile
lastemacs=`cat .byte-compile`; if [ "$$lastemacs" != "$(EMACS)" ]; then rm -f .byte-compile; make .byte-compile; fi
+## Compiling can show up errors in the code, but be wary of fixing obsoletion
+## warnings unless they're valid for both Emacsen.
.byte-compile: $(EL) x-symbol/lisp/*.el
@echo "****************************************************************"
- @echo " Byte compiling... (ignoring errors: watch for \"Error\" or \"!!\")"
+ @echo " Byte compiling..."
@echo "****************************************************************"
- rm -f $(ELC)
- -$(BYTECOMP) $(EL)
- rm -f $(BROKENELC)
+ rm -f $(ELC)
+# $(BYTECOMP) $(EL)
+ make elc
@echo " Byte compiling X-Symbol..."
(cd x-symbol/lisp; rm -f *.elc; $(MAKE) EMACS="$(EMACS) -q -no-site-file")
echo $(EMACS) > $(@)
@@ -97,13 +92,11 @@ compile: .byte-compile
##
-## Make .elc's individually. For testing only: it's a nuisance to
-## set compiling context properly in each .el file.
+## Make individual .elc. Building separately means we need to be careful
+## to add proper requires in source files.
##
-
.el.elc:
$(BYTECOMP) $*.el
- rm -f $(BROKENELC)
elc: $(ELC)