Makefile 5.77 KB
Newer Older
David Kågedal's avatar
David Kågedal committed
1
# -*- Makefile -*-
Linus Tolke's avatar
Linus Tolke committed
2
# $Id$
3
# Copyright (C) 1991, 1996  Lysator Academic Computer Association.
Linus Tolke's avatar
Linus Tolke committed
4
5
6
7
8
#
# 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 
9
# the Free Software Foundation; either version 2, or (at your option) 
Linus Tolke's avatar
Linus Tolke committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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.45-beta
29

30
31
32
SHELL = /bin/sh

LISPDIR = /usr/gnu/share/emacs/site-lisp
David Kågedal's avatar
David Kågedal committed
33
FTPDIR = /usr/ftp/pub/lyskom/elisp-client
34

35
36
GENERIC-CLEAN = *~ *.o core
GENERIC-DIST-CLEAN = TAGS
Linus Tolke's avatar
Linus Tolke committed
37

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

Linus Tolke's avatar
Linus Tolke committed
40
# for compiling using emacs 19!
41
EMACS=emacs
David Kågedal's avatar
David Kågedal committed
42
EMACS-BATCH = $(EMACS) -batch -l ./lpath.el
Per Cederqvist's avatar
.    
Per Cederqvist committed
43
44

# NOTE: lyskom-rest.el must be the last file in PARTS-EL and SRC-ELC.
David Kågedal's avatar
David Kågedal committed
45
PARTS-EL = komtypes.el clienttypes.el  deferred-insert.el utilities.el \
David Byers's avatar
X    
David Byers committed
46
	buffers.el \
47
	prefetch.el \
David Kågedal's avatar
David Kågedal committed
48
	startup.el \
Linus Tolke's avatar
Linus Tolke committed
49
	reading.el \
David Kågedal's avatar
David Kågedal committed
50
51
52
	internal.el \
	services.el \
	command.el \
David Byers's avatar
X    
David Byers committed
53
	view-mode.el \
David Kågedal's avatar
David Kågedal committed
54
	parse.el cache.el\
Per Cederqvist's avatar
.    
Per Cederqvist committed
55
	commands1.el commands2.el review.el edit-text.el \
56
	filter.el filter-edit.el lyskom-buttons.el \
Per Cederqvist's avatar
.    
Per Cederqvist committed
57
	view-text.el async.el completing-read.el \
58
	prioritize.el flags.el messages.el ansaphone.el remote-control.el \
David Kågedal's avatar
David Kågedal committed
59
	menus.el slow.el \
David Kågedal's avatar
David Kågedal committed
60
	elib-string.el  \
61
	option-edit.el \
62
	lyskom-rest.el
David Byers's avatar
X    
David Byers committed
63
64
HEADER-EL = defvar.el vars.el macros.el compatibility.el language.el
HEADER-ELC = defvar.elc vars.elc macros.elc compatibility.elc language.elc
65
66
67
68
SWEDISH-EL = swedish-strings.el
SWEDISH-ELC = swedish-strings.elc
ENGLISH-EL = english-strings.el
ENGLISH-ELC = english-strings.elc
David Kågedal's avatar
David Kågedal committed
69
SRC-ELC = komtypes.elc clienttypes.elc deferred-insert.elc utilities.elc \
David Byers's avatar
X    
David Byers committed
70
	buffers.elc \
71
	prefetch.elc \
David Kågedal's avatar
David Kågedal committed
72
	startup.elc \
Linus Tolke's avatar
Linus Tolke committed
73
	reading.elc \
David Kågedal's avatar
David Kågedal committed
74
75
76
	internal.elc \
	services.elc \
	command.elc \
David Byers's avatar
X    
David Byers committed
77
	vire-mode.elc \
David Kågedal's avatar
David Kågedal committed
78
	parse.elc cache.elc\
Per Cederqvist's avatar
.    
Per Cederqvist committed
79
	commands1.elc commands2.elc review.elc edit-text.elc \
80
	filter.elc filter-edit.elc lyskom-buttons.elc \
Per Cederqvist's avatar
.    
Per Cederqvist committed
81
	view-text.elc async.elc completing-read.elc \
82
	prioritize.elc flags.elc messages.elc ansaphone.elc \
83
	remote-control.elc menus.elc slow.elc elib-string.elc \
84
	option-edit.elc \
85
	lyskom-rest.elc 
Per Cederqvist's avatar
.    
Per Cederqvist committed
86
87
88
PARTS-ELC = $(SRC-ELC)


89
# The default target
Per Cederqvist's avatar
.    
Per Cederqvist committed
90
91
all: lyskom.elc

92
93
.SUFFIXES : .el .elc
.el.elc:
David Kågedal's avatar
David Kågedal committed
94
	$(EMACS-BATCH) -f batch-byte-compile $*.el
95

96
97
# influenced by autoconf? Yes.
vars.el: vars.el.in Makefile
98
	rm -f vars.el
99
	sed 's/@@CLIENTVERSION@@/$(CLIENTVERSION)/' < vars.el.in > vars.el
100
	chmod 444 vars.el
101

David Byers's avatar
X    
David Byers committed
102
103
lyskom.el: $(HEADER-EL) $(SWEDISH-EL) $(ENGLISH-EL) $(PARTS-EL)
	cat $(HEADER-EL) $(SWEDISH-EL) $(ENGLISH-EL) $(PARTS-EL) > lyskom.el
104

David Kågedal's avatar
David Kågedal committed
105
lyskom.elc: lyskom.el
106
	$(EMACS-BATCH) -l ./lpath.el -f batch-byte-compile lyskom.el
David Kågedal's avatar
David Kågedal committed
107

108
.PHONY: check
David Byers's avatar
David Byers committed
109
110
check: lyskom.el
	$(EMACS-BATCH) -l ./lyskom.el  -l ./check-strings.el -f lyskom-check-strings
111

112
# Do "make verbose" to see where things go wrong
113
.PHONY: verbose
114
115
116
verbose: verbose-el lyskom.elc

.PHONY: verbose-el
David Byers's avatar
X    
David Byers committed
117
verbose-el: $(HEADER-EL) $(SWEDISH-EL) $(ENGLISH-EL) $(PARTS-EL)
118
119
	@echo "Building lyskom.el"
	@echo "" > lyskom.el
David Byers's avatar
X    
David Byers committed
120
	@for i in $(HEADER-EL) $(SWEDISH-EL) $(ENGLISH-EL) $(PARTS-EL) ; do \
121
122
123
124
		echo '(eval-when-compile (message "Compiling %s" "'$$i'"))' >> lyskom.el ;\
		cat $$i >> lyskom.el ; \
	done 

125
126
127
# 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
128

129
130
english-lyskom.elc: english-lyskom.el
	$(EMACS-BATCH) -f batch-byte-compile english-lyskom.el
Per Cederqvist's avatar
.    
Per Cederqvist committed
131

132
133
134
# The method of compiling elc files separately is now depreceated
# I dont want any warnings of the newer file...
vars.elc: vars.el macros.elc
David Kågedal's avatar
David Kågedal committed
135
	$(EMACS-BATCH) -f batch-byte-compile $*.el
136
137
138
139
140
141
142
143
144

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

# For fast compiling
.PHONY: fast
fast: $(HEADER-ELC) $(SWEDISH-ELC) $(PARTS-ELC)
	cat $(HEADER-ELC) $(SWEDISH-ELC) $(PARTS-ELC) > lyskom.elc

Linus Tolke's avatar
Linus Tolke committed
145
$(SRC-ELC) $(SWEDISH-ELC) $(ENGLISH-ELC): macros.elc
Per Cederqvist's avatar
.    
Per Cederqvist committed
146
147
148
149

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


150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
lyskom-$(CLIENTVERSION).elc: lyskom.elc
	cp lyskom.elc lyskom-$(CLIENTVERSION).elc

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


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



Per Cederqvist's avatar
.    
Per Cederqvist committed
169
170
171
172
173
174
175
176
177
178
#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:
179
	@wc $(HEADER-EL) $(PARTS-EL) $(SWEDISH-EL) $(ENGLISH-EL)
180
	@wc ChangeLog ../misc/todo
Per Cederqvist's avatar
.    
Per Cederqvist committed
181

Linus Tolke's avatar
Linus Tolke committed
182
TAGS: $(HEADER-EL) $(PARTS-EL) $(SWEDISH-EL) $(ENGLISH-EL)
183
	etags $(HEADER-EL) $(PARTS-EL) $(SWEDISH-EL) $(ENGLISH-EL)
Per Cederqvist's avatar
.    
Per Cederqvist committed
184

185
install: lyskom.elc lyskom.el
David Kågedal's avatar
David Kågedal committed
186
	cp lyskom.el lyskom.elc $(LISPDIR)
187

188
release: lyskom-$(CLIENTVERSION).el.gz english-lyskom-$(CLIENTVERSION).el.gz
189
190
	cp lyskom-$(CLIENTVERSION).el.gz $(FTPDIR)
	cp english-lyskom-$(CLIENTVERSION).el.gz $(FTPDIR)
191

192
193
194
clean:
	$(RM) *.el.gz *.elc.gz lyskom.el english-lyskom.el
	$(RM) *lyskom-$(CLIENTVERSION).*
195
	$(RM) *~ *.elc $(GENERIC-CLEAN)
Per Cederqvist's avatar
.    
Per Cederqvist committed
196

Linus Tolke's avatar
Linus Tolke committed
197
distclean: clean
198
	$(RM) $(GENERIC-DIST-CLEAN) vars.el