Makefile 3.95 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

28

David Byers's avatar
David Byers committed
29
30
31
32
33
34
35
36
37
38
39
# ======================================================================
# Useful targets: all, lyskom.el lyskom.elc check verbose TAGS release
# clean distclean install
# ======================================================================

#
# NOTE: If you change this file, don't forget to change the distribution 
# makefile too!
#

CLIENTVERSION = 0.45-beta
40

David Kågedal's avatar
David Kågedal committed
41
FTPDIR = /usr/ftp/pub/lyskom/elisp-client
David Byers's avatar
David Byers committed
42
43
LISPDIR = /usr/gnu/share/emacs/site-lisp
LANGUAGES = swedish english
44

David Byers's avatar
David Byers committed
45
46
47
48
SHELL = /bin/sh
RM = /bin/rm -f
EMACS=emacs
EMACS-BATCH = $(EMACS) -batch
49
50
GENERIC-CLEAN = *~ *.o core
GENERIC-DIST-CLEAN = TAGS
Linus Tolke's avatar
Linus Tolke committed
51

David Byers's avatar
David Byers committed
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
LANGUAGE-EL=$(LANGUAGES:%=%-strings.el)
EMACS-BATCH=$(EMACS) -batch
SOURCES	 = 	$(LANGUAGE-EL) \
		komtypes.el \
		clienttypes.el \
		deferred-insert.el \
		utilities.el \
		buffers.el \
		prefetch.el \
		startup.el \
		reading.el \
		internal.el \
		services.el \
		command.el \
		parse.el \
		cache.el \
		commands1.el \
		commands2.el \
		review.el \
		edit-text.el \
		filter.el \
		filter-edit.el \
		lyskom-buttons.el \
		view-text.el \
		async.el \
		completing-read.el \
		prioritize.el \
		flags.el \
		messages.el \
		ansaphone.el \
		remote-control.el \
		menus.el slow.el \
		elib-string.el \
		option-edit.el \
		lyskom-rest.el

HEADER = 	defvar.el \
		vars.el \
		macros.el \
		compatibility.el \
		language.el

MISC =		envcheck.el \
		lpath.el

DISTFILES =     Makefile \
		README \
		COPYING

DISTSRC = $(DISTFILES:%=distribution-%)
HEADER-ELC = $(HEADER:%.el=%.elc)
SOURCES-ELC = $(SOURCES:%.el=%.elc)
104

Per Cederqvist's avatar
.    
Per Cederqvist committed
105

David Byers's avatar
David Byers committed
106
all: lyskom.elc
107

108
vars.el: vars.el.in Makefile
109
	rm -f vars.el
110
	sed 's/@@CLIENTVERSION@@/$(CLIENTVERSION)/' < vars.el.in > vars.el
111
	chmod 444 vars.el
112

David Byers's avatar
David Byers committed
113
114
lyskom.el: $(HEADER) $(SOURCES)
	cat $(HEADER) $(SOURCES) > lyskom.el
115

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

David Byers's avatar
David Byers committed
119
check: lyskom.el
David Byers's avatar
David Byers committed
120
121
	$(EMACS-BATCH) -l ./lpath.el -l ./lyskom.el  -l ./check-strings.el \
			-f lyskom-check-strings
122

123
.PHONY: verbose
David Byers's avatar
David Byers committed
124
125
.PHONY: verbose-el

126
127
verbose: verbose-el lyskom.elc

David Byers's avatar
David Byers committed
128
verbose-el: $(HEADER) $(SOURCES)
129
130
	@echo "Building lyskom.el"
	@echo "" > lyskom.el
David Byers's avatar
David Byers committed
131
132
133
	@for i in $(HEADER) $(SOURCES) ; do \
		echo '(eval-when-compile (message "Compiling %s" "'$$i'"))' \
			>> lyskom.el ;\
134
135
136
		cat $$i >> lyskom.el ; \
	done 

Per Cederqvist's avatar
.    
Per Cederqvist committed
137

David Byers's avatar
David Byers committed
138
139
TAGS: $(HEADER) $(SOURCES)
	etags $(HEADER) $(SOURCES)
Per Cederqvist's avatar
.    
Per Cederqvist committed
140

141
install: lyskom.elc lyskom.el
David Kågedal's avatar
David Kågedal committed
142
	cp lyskom.el lyskom.elc $(LISPDIR)
143

David Byers's avatar
David Byers committed
144
145
146
147
148
149
150
151
152
153
154
release: $(HEADER) $(SOURCES) $(DISTSRC) $(MISC)
	mkdir lyskom-$(CLIENTVERSION)
	cp $(HEADER) $(SOURCES) $(MISC) lyskom-$(CLIENTVERSION)
	for i in $(DISTFILES) ; do \
		cp distribution-$$i lyskom-$(CLIENTVERSION)/$$i ; \
	done
	tar cvf lyskom-$(CLIENTVERSION).tar lyskom-$(CLIENTVERSION)
	gzip -9 lyskom-$(CLIENTVERSION).tar
	cp lyskom-$(CLIENTVERSION).tar.gz $(FTPDIR)
	rm -rf lyskom-$(CLIENTVERSION)
	rm -rf lyskom-$(CLIENTVERSION).tar.gz
155

156
157
clean:
	$(RM) *.el.gz *.elc.gz lyskom.el english-lyskom.el
David Byers's avatar
David Byers committed
158
159
160
	$(RM) -rf lyskom-$(CLIENTVERSION) \
		  lyskom-$(CLIENTVERSION).tar \
		  lyskom-$(CLIENTVERSION).tar.gz
161
	$(RM) *~ *.elc $(GENERIC-CLEAN)
Per Cederqvist's avatar
.    
Per Cederqvist committed
162

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