Makefile 5.05 KB
Newer Older
David Kågedal's avatar
David Kågedal committed
1
# -*- Makefile -*-
Linus Tolke's avatar
Linus Tolke committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# $Id$
# Copyright (C) 1991  Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
# 
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by 
# the Free Software Foundation; either version 1, or (at your option) 
# any later version.
# 
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING.  If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se. 
#
25
26
# $Id$
#
Per Cederqvist's avatar
.    
Per Cederqvist committed
27

David Byers's avatar
David Byers committed
28
CLIENTVERSION = 0.39
29

30
31
GENERIC-CLEAN = *~ *.o core
GENERIC-DIST-CLEAN = TAGS
Linus Tolke's avatar
Linus Tolke committed
32

Per Cederqvist's avatar
.    
Per Cederqvist committed
33
RM = /usr/gnu/bin/rm -vf
34

Linus Tolke's avatar
Linus Tolke committed
35
# for compiling using emacs 19!
36
37
EMACS=emacs
EMACS-BATCH = $(EMACS) -batch
Per Cederqvist's avatar
.    
Per Cederqvist committed
38
39

# NOTE: lyskom-rest.el must be the last file in PARTS-EL and SRC-ELC.
40
PARTS-EL = komtypes.el clienttypes.el startup.el \
Linus Tolke's avatar
Linus Tolke committed
41
	reading.el \
Per Cederqvist's avatar
.    
Per Cederqvist committed
42
43
	internal.el parse.el services.el cache.el\
	commands1.el commands2.el review.el edit-text.el \
44
	filter.el filter-edit.el lyskom-buttons.el \
Per Cederqvist's avatar
.    
Per Cederqvist committed
45
	view-text.el async.el completing-read.el \
46
	prioritize.el flags.el messages.el ansaphone.el remote-control.el \
Per Cederqvist's avatar
.    
Per Cederqvist committed
47
	elib-string.el \
48
	lyskom-rest.el
49
50
51
52
53
54
55
HEADER-EL = macros.el vars.el
HEADER-ELC = macros.elc vars.elc
SWEDISH-EL = swedish-strings.el
SWEDISH-ELC = swedish-strings.elc
ENGLISH-EL = english-strings.el
ENGLISH-ELC = english-strings.elc
SRC-ELC = komtypes.elc clienttypes.elc startup.elc \
Linus Tolke's avatar
Linus Tolke committed
56
	reading.elc \
Per Cederqvist's avatar
.    
Per Cederqvist committed
57
58
	internal.elc parse.elc services.elc cache.elc\
	commands1.elc commands2.elc review.elc edit-text.elc \
59
	filter.elc filter-edit.elc lyskom-buttons.elc \
Per Cederqvist's avatar
.    
Per Cederqvist committed
60
	view-text.elc async.elc completing-read.elc \
61
	prioritize.elc flags.elc messages.elc ansaphone.elc remote-control.elc \
Per Cederqvist's avatar
.    
Per Cederqvist committed
62
	elib-string.elc \
63
	lyskom-rest.elc 
Per Cederqvist's avatar
.    
Per Cederqvist committed
64
65
66
67
PARTS-ELC = $(SRC-ELC)

.SUFFIXES : .el .elc
.el.elc:
68
	$(EMACS-BATCH) -l `pwd`/macros -l `pwd`/vars -f batch-byte-compile $*.el
Per Cederqvist's avatar
.    
Per Cederqvist committed
69
70
71

all: lyskom.elc

72
73
74
75
76
77
78
# I dont want any warnings of the newer file...
vars.elc: vars.el macros.elc
	$(EMACS-BATCH) -l `pwd`/macros -f batch-byte-compile $*.el

macros.elc: macros.el
	$(EMACS-BATCH) -f batch-byte-compile $*.el

79
80
# influenced by autoconf? Yes.
vars.el: vars.el.in Makefile
81
	rm -f vars.el
82
	sed 's/@@CLIENTVERSION@@/$(CLIENTVERSION)/' < vars.el.in > vars.el
83
	chmod 444 vars.el
84

85
86
87
lyskom.el: $(HEADER-EL) $(SWEDISH-EL) $(PARTS-EL)
	cat $(HEADER-EL) $(SWEDISH-EL) $(PARTS-EL) > lyskom.el

David Kågedal's avatar
David Kågedal committed
88
89
90
91
92
93
lyskom.elc: lyskom.el
	$(EMACS-BATCH) -f batch-byte-compile lyskom.el

# For fast compiling
.PHONY: fast
fast: $(HEADER-ELC) $(SWEDISH-ELC) $(PARTS-ELC)
94
	cat $(HEADER-ELC) $(SWEDISH-ELC) $(PARTS-ELC) > lyskom.elc
Linus Tolke's avatar
Linus Tolke committed
95

96
97
98
# English version
english-lyskom.el: $(HEADER-EL) $(ENGLISH-EL) $(PARTS-EL)
	cat $(HEADER-EL) $(ENGLISH-EL) $(PARTS-EL) > english-lyskom.el
Per Cederqvist's avatar
.    
Per Cederqvist committed
99

100
101
english-lyskom.elc: english-lyskom.el
	$(EMACS-BATCH) -f batch-byte-compile english-lyskom.el
Per Cederqvist's avatar
.    
Per Cederqvist committed
102

Linus Tolke's avatar
Linus Tolke committed
103
$(SRC-ELC) $(SWEDISH-ELC) $(ENGLISH-ELC): macros.elc
Per Cederqvist's avatar
.    
Per Cederqvist committed
104
105
106
107
108
109
110
111
112
113
114
115
116
117

elc-files: $(HEADER-ELC) $(PARTS-ELC) 


#Detta kr{ver gnu-make. Tyv{rr funkade inte $(SRC-ELC)-prylen l{ngre ner alls.
#Kanske denna $(SRC-ELC) pryl fungerar.
#$(SRC-ELC) :%.elc: %.el macros.elc
#	$(EMACS-BATCH) -l ./macros.elc -f batch-byte-compile $<

#$(SRC-ELC):
#	$(EMACS-BATCH) -l ./macros.el -f batch-byte-compile $*.el


wc:
118
	@wc $(HEADER-EL) $(PARTS-EL) $(SWEDISH-EL) $(ENGLISH-EL)
Linus Tolke's avatar
Linus Tolke committed
119
	@wc ../doc/elisp-client.latexinfo ChangeLog ../misc/todo
Per Cederqvist's avatar
.    
Per Cederqvist committed
120

Linus Tolke's avatar
Linus Tolke committed
121
TAGS: $(HEADER-EL) $(PARTS-EL) $(SWEDISH-EL) $(ENGLISH-EL)
122
	etags $(HEADER-EL) $(PARTS-EL) $(SWEDISH-EL) $(ENGLISH-EL)
Per Cederqvist's avatar
.    
Per Cederqvist committed
123
124

doc:
Linus Tolke's avatar
$(MAKE)    
Linus Tolke committed
125
	(cd ../doc ; $(MAKE) elisp-client elisp-client.txt ; )
Per Cederqvist's avatar
.    
Per Cederqvist committed
126

127
install: installnodoc installdoc
Per Cederqvist's avatar
.    
Per Cederqvist committed
128

129
130
installatlysator: lyskom-$(CLIENTVERSION).elc lyskom.el
	# Lysator
Linus Tolke's avatar
Linus Tolke committed
131
	cp lyskom.el /usr/gnu/lib/emacs/site-lisp/lyskom.el
Linus Tolke's avatar
Linus Tolke committed
132
	cp lyskom.el /usr/local/var/elisp/lyskom.el
Linus Tolke's avatar
Linus Tolke committed
133
	cp lyskom-$(CLIENTVERSION).elc /usr/gnu/lib/emacs/site-lisp/lyskom.elc
134

David Kågedal's avatar
David Kågedal committed
135
lyskom-$(CLIENTVERSION).elc: lyskom.elc
David Kågedal's avatar
David Kågedal committed
136
	cp lyskom.elc lyskom-$(CLIENTVERSION).elc
Linus Tolke's avatar
Linus Tolke committed
137

138
139
140
141
142
143
144
145
146
147
lyskom.elc-compatibility: lyskom.el
	$(EMACS-BATCH) -l ./compatibility.el -f batch-byte-compile lyskom.el
	mv lyskom.elc lyskom.elc-compatibility

lyskom-$(CLIENTVERSION).el.gz: lyskom.el
	gzip -9 < lyskom.el > lyskom-$(CLIENTVERSION).el.gz

lyskom-$(CLIENTVERSION).elc.gz: lyskom-$(CLIENTVERSION).elc
	gzip -9 < lyskom-$(CLIENTVERSION).elc > lyskom-$(CLIENTVERSION).elc.gz

Linus Tolke's avatar
Linus Tolke committed
148
149
installatftp: lyskom-$(CLIENTVERSION).el.gz
	mv lyskom-$(CLIENTVERSION).el.gz /usr/ftp/pub/lyskom/elisp-client
150
151
152

.PHONY: installnodoc
installnodoc: installatlysator installatftp
153

Linus Tolke's avatar
Linus Tolke committed
154
# This is now the responsability of the Makefile in the doc-dir.
155
installdoc: doc
Linus Tolke's avatar
Linus Tolke committed
156
	( cd ../doc; make install )
Per Cederqvist's avatar
.    
Per Cederqvist committed
157

158
159
160
161
162
163
smallclean:
	$(RM) lyskom-$(CLIENTVERSION).el.gz lyskom-$(CLIENTVERSION).elc.gz
	$(RM) lyskom-$(CLIENTVERSION).elc lyskom.el

clean: smallclean
	$(RM) *~ *.elc $(GENERIC-CLEAN)
Per Cederqvist's avatar
.    
Per Cederqvist committed
164

Linus Tolke's avatar
Linus Tolke committed
165
distclean: clean
166
	$(RM) $(GENERIC-DIST-CLEAN) Topdir.make */Topdir.make vars.el