aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
blob: 8768b8a72fa0967608678ea2dcd7edcce9674012 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
##
## Makefile for Proof General.
## 
## Author:  David Aspinall <da@dcs.ed.ac.uk>
##
## Maintainer:  Proof General maintainer <proofgen@dcs.ed.ac.uk>
##
##
##  make compile	- make .elc's in a single session
##  make all		- make .elc's in separate sessions
##
##
## $Id$
## 
###########################################################################


ELISP_DIRS = generic lego coq isa
EMACS = xemacs

PWD=$(shell pwd)

# 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.
BYTECOMP = $(EMACS) -batch -q -no-site-file -eval '(setq load-path (append (list "$(PWD)/generic" "$(PWD)/lego" "$(PWD)/coq" "$(PWD)/isa") load-path))' -f batch-byte-compile

EL=$(shell for f in $(ELISP_DIRS); do ls $$f/*.el; done)
ELC=$(EL:.el=.elc)

.SUFFIXES:	.el .elc

## 
## compile : byte compile files in working directory:
##           Clearout old .elc's and re-compile in a
##           single Emacs process.  This is faster than make all,
##	     but can have artefacts because of context between
##	     compiles.
##
compile:
	@echo "*************************************************"
	@echo " Byte compiling..."
	@echo "*************************************************"
	(rm -f $(ELC); $(BYTECOMP) $(EL))
	@echo "*************************************************"
	@echo " Finished."
	@echo "*************************************************"

all:	$(ELC)

.el.elc:
	$(BYTECOMP) $*.el

##
##
##	
clean:
	rm -f $(ELC)	


##
## This special target lets us use targets defined 
## in developer's makefile Makefile.devel conveniently,
## via make devel.<target>
##

devel.%:
	make -f Makefile.devel $*