1 # Makefile for emacs-lisp package
3 #ident "@(#)v2_9_9:Makefile,v 1.28 2000/03/05 21:32:20 monnier Exp"
5 # Copyright (C) 1998-2000 Free Software Foundation, Inc.
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by the
9 # Free Software Foundation; either version 2, or (at your option) any
12 # This file is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs; see the file COPYING. If not, write to
19 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21 # load the package-specific settings
24 # set up the usual installation paths
26 datadir = $(prefix)/share
28 # the directory where you install third-party emacs packges
29 lispdir = $(datadir)/emacs/site-lisp
31 # the directory where the .elc files will be installed
32 elcdir = $(lispdir)/$(PACKAGE)
33 # the directory where the .el files will be installed
36 # the file where the initialization goes.
37 #startupfile = $(HOME/.emacs
38 startupfile = $(lispdir)/site-start.el
40 # the directory where you installed the elib .elc files.
41 # This is only needed if your site-start.el (or default.el) does not
42 # set up elib correctly.
43 elibdir = $(lispdir)/elib
45 # the directory where you install the info doc
46 infodir = $(prefix)/info
47 docdir = $(prefix)/doc
59 ######################################################################
60 ### No changes below this line should be necessary ###
61 ######################################################################
63 ELFLAGS = --eval '(setq load-path (append (list "." "$(elibdir)" "$(lispdir)") load-path))'
64 ELC = $(EMACS) -batch $(ELFLAGS) -f batch-byte-compile
66 ELCFILES = $(ELFILES:.el=.elc)
68 TEXEXTS = *.cps *.fns *.kys *.vr *.tp *.pg *.log *.aux *.toc *.cp *.ky *.fn
70 .SUFFIXES: .elc .el .info .ps .dvi .texi
71 .PHONY: elcfiles info clean distclean default
72 .PHONY: install_startup install_elc install install_el install_info
73 .PHONY: dvi postscript
87 ######################################################################
94 install_elc: $(ELCFILES) $(PACKAGE)-startup.el
96 $(CP) $(ELCFILES) $(PACKAGE)-startup.el $(elcdir)/
100 $(CP) $(ELFILES) $(eldir)/
102 install_info: $(PACKAGE).info
104 $(CP) *.info* $(infodir)/
105 -[ ! -w $(infodir)/dir ] \
106 || install-info --info-dir=$(infodir) $(PACKAGE).info
110 @if grep $(PACKAGE) $(lispdir)/site-start.el >/dev/null 2>&1 || \
111 grep $(PACKAGE) $(startupfile) >/dev/null 2>&1 || \
112 grep $(PACKAGE) $(lispdir)/default.el >/dev/null 2>&1; then \
113 echo "**********************************************************" ;\
114 echo "*** It seems you already have some setup code" ;\
115 echo "*** for $(PACKAGE) in your startup files." ;\
116 echo "*** Check that it properly loads \"$(PACKAGE)-startup\"" ;\
117 echo "**********************************************************" ;\
119 echo 'echo ";; load $(PACKAGE) setup code" >>$(startupfile)' ;\
120 echo ";; load $(PACKAGE) setup code" >>$(startupfile) ;\
121 echo 'echo "(add-to-list '\''load-path \"$(elcdir)\")" >>$(startupfile)' ;\
122 echo "(add-to-list 'load-path \"$(elcdir)\")" >>$(startupfile) ;\
123 echo 'echo "(load \"$(PACKAGE)-startup\")" >>$(startupfile)' ;\
124 echo "(load \"$(PACKAGE)-startup\")" >>$(startupfile) ;\
127 postscript: $(PACKAGE).ps
131 $(CP) *.dvi $(docdir)/
133 install: install_elc install_info install_startup # install_el
136 $(RM) *~ core .\#* $(TEXEXTS)
142 $(RM) *.elc *.dvi *.info* *.ps
144 ######################################################################
145 ### don't look below ###
146 ######################################################################
148 $(PACKAGE)-startup.el: $(ELFILES)
149 [ -f $@ ] || echo '
\f' >$@
150 $(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "."
154 TAG = $(shell echo v$(VERSION) | tr '.' '_')
155 ftpdir=/home/ftp/pub/monnier/$(PACKAGE)
158 cvs tag -F $(TAG) &&\
160 cvs export -r $(TAG) -d $(PACKAGE)-$(VERSION) elisp/$(PACKAGE) &&\
161 cd $(PACKAGE)-$(VERSION) &&\
162 gmake info $(PACKAGE)-startup.el &&\
164 ztar $(PACKAGE)-$(VERSION) &&\
165 rm -rf $(PACKAGE)-$(VERSION)
166 mv $(TMP)/$(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/
167 ln -sf $(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/$(PACKAGE).tar.gz