]> code.delx.au - gnu-emacs-elpa/blob - Makefile
* Makefile: updated to the version of pcl-cvs.
[gnu-emacs-elpa] / Makefile
1 # Makefile for emacs-lisp package
2
3 # Copyright (C) 1998-1999 Stefan Monnier <monnier@cs.yale.edu>
4
5 # This file is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 2, or (at your option) any
8 # later version.
9
10 # This file is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with GNU Emacs; see the file COPYING. If not, write to
17 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 prefix = /usr/local
20 datadir = $(prefix)/share
21
22 # the directory where you install third-party emacs packges
23 lispdir = $(datadir)/emacs/site-lisp
24
25 # the directory where you installed the elib .elc files.
26 # This is only needed if your site-start.el (or default.el) does not
27 # set up elib correctly.
28 elibdir = $(lispdir)/elib
29
30 # the directory where you install the info doc
31 infodir = $(prefix)/info
32 docdir = $(prefix)/doc
33
34 EMACS = emacs
35 MAKEINFO= makeinfo
36 TEXI2DVI= texi2dvi
37 SHELL = /bin/sh
38 DVIPS = dvips
39 CP = cp
40 MKDIR = mkdir -p
41 ETAGS = etags
42
43 ######################################################################
44 ### No changes below this line should be necessary ###
45 ######################################################################
46
47 PACKAGE = sml-mode
48
49 # the directory where the .elc files will be installed
50 elcdir = $(lispdir)/$(PACKAGE)
51 eldir = $(elcdir)
52
53 ELFLAGS = --eval '(setq load-path (append (list "." "$(elibdir)" "$(lispdir)") load-path))'
54 ELC = $(EMACS) -batch $(ELFLAGS) -f batch-byte-compile
55
56 ELFILES = sml-compat.el sml-util.el sml-defs.el sml-move.el sml-mode.el \
57 sml-proc.el
58 ELCFILES = $(ELFILES:.el=.elc)
59
60 TEXEXTS = *.cps *.fns *.kys *.vr *.tp *.pg *.log *.aux *.toc *.cp *.ky *.fn
61
62 .SUFFIXES: .elc .el .info .ps .dvi .texi
63 .PHONY: elcfiles info clean distclean default
64 .PHONY: install_startup install_elc install install_el install_info
65
66 .el.elc:
67 $(ELC) $<
68
69 .texi.info:
70 $(MAKEINFO) $<
71
72 .texi.dvi:
73 $(TEXI2DVI) $<
74
75 .dvi.ps:
76 $(DVIPS) -f $< >$@
77
78 ######################################################################
79
80 default: elcfiles
81
82 elcfiles: $(ELCFILES)
83 info: $(PACKAGE).info
84
85 install_elc: $(ELCFILES)
86 $(MKDIR) $(elcdir)
87 $(CP) $(ELCFILES) $(elcdir)/
88
89 install_el:
90 $(MKDIR) $(eldir)
91 $(CP) $(ELFILES) $(eldir)/
92
93 install_info: $(PACKAGE).info
94 $(MKDIR) $(infodir)
95 $(CP) *.info* $(infodir)/
96 -[ ! -w $(infodir)/dir ] || install-info $(PACKAGE).info $(infodir)/dir
97
98 install_startup:
99 $(MKDIR) $(lispdir)
100 if grep $(PACKAGE) $(lispdir)/site-start.el >/dev/null 2>&1 || \
101 grep $(PACKAGE) $(lispdir)/default.el >/dev/null 2>&1; then \
102 echo "!!! Check $(PACKAGE)-startup.el and merge it" \
103 echo "!!! into your $(lispdir)/site-start.el file"; \
104 else \
105 sed 's|@elcdir@|$(elcdir)|' \
106 $(PACKAGE)-startup.el >>$(lispdir)/site-start.el ;\
107 fi
108
109 install_dvi: $(PACKAGE).dvi
110 $(MKDIR) $(docdir)
111 $(CP) *.dvi $(docdir)/
112
113 install: install_elc install_info # install_el
114
115 clean:
116 $(RM) *~ core .\#* $(TEXEXTS)
117
118 TAGS tags:
119 $(ETAGS) $(ELFILES)
120
121 distclean: clean
122 $(RM) *.elc *.dvi *.info* *.ps
123
124 ######################################################################
125 ### don't look below ###
126 ######################################################################
127
128 $(PACKAGE)-startup.el: $(ELFILES)
129 chmod +w $@
130 $(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "."
131
132 ##
133
134 TAG = $(shell echo v$(VERSION) | tr '.' '_')
135 ftpdir=/home/ftp/pub/monnier/$(PACKAGE)
136
137 dist:
138 cvs tag -F $(TAG) &&\
139 cd $(TMP) &&\
140 cvs export -r $(TAG) -d $(PACKAGE)-$(VERSION) elisp/$(PACKAGE) &&\
141 cd $(PACKAGE)-$(VERSION) &&\
142 gmake info &&\
143 cd .. &&\
144 ztar $(PACKAGE)-$(VERSION) &&\
145 rm -rf $(PACKAGE)-$(VERSION)
146 mv $(TMP)/$(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/
147 ln -sf $(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/$(PACKAGE).tar.gz
148
149
150 #ident @(#)$Name$:$Id$