1 # Makefile for emacs-lisp package
3 # Copyright (C) 1998-1999 Stefan Monnier <monnier@cs.yale.edu>
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
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
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.
20 datadir = $(prefix)/share
22 # the directory where you install third-party emacs packges
23 lispdir
= $(datadir)/emacs
/site-lisp
24 startupfile
= $(lispdir
)/site-start.el
26 # the directory where you installed the elib .elc files.
27 # This is only needed if your site-start.el (or default.el) does not
28 # set up elib correctly.
29 elibdir
= $(lispdir
)/elib
31 # the directory where you install the info doc
32 infodir = $(prefix)/info
33 docdir
= $(prefix)/doc
44 ######################################################################
45 ### No changes below this line should be necessary ###
46 ######################################################################
50 # the directory where the .elc files will be installed
51 elcdir
= $(lispdir
)/$(PACKAGE
)
54 ELFLAGS
= --eval
'(setq load-path (append (list "." "$(elibdir)" "$(lispdir)") load-path))'
55 ELC
= $(EMACS
) -batch
$(ELFLAGS
) -f batch-byte-compile
57 ELFILES
= sml-compat.el sml-util.el sml-defs.el sml-move.el sml-mode.el \
59 ELCFILES
= $(ELFILES
:.el
=.elc
)
61 TEXEXTS
= *.cps
*.fns
*.kys
*.vr
*.tp
*.pg
*.log
*.aux
*.toc
*.cp
*.ky
*.fn
63 .SUFFIXES
: .elc .el .
info .ps .
dvi .texi
64 .PHONY
: elcfiles
info clean distclean default
65 .PHONY
: install_startup install_elc
install install_el install_info
66 .PHONY
: dvi postscript
80 ######################################################################
87 install_elc
: $(ELCFILES
)
89 $(CP
) $(ELCFILES
) $(elcdir
)/
93 $(CP
) $(ELFILES
) $(eldir
)/
95 install_info
: $(PACKAGE
).
info
97 $(CP
) *.
info* $(infodir)/
98 -[ ! -w
$(infodir)/dir ] || install-info
$(PACKAGE
).
info $(infodir)/dir
102 if grep
$(PACKAGE
) $(startupfile
) >/dev
/null
2>&1 || \
103 grep
$(PACKAGE
) $(lispdir
)/default.el
>/dev
/null
2>&1; then \
104 echo
"!!! Check $(PACKAGE)-startup.el and merge it" \
105 echo
"!!! into your $(startupfile) file"; \
107 sed
's|@elcdir@|$(elcdir)|' \
108 $(PACKAGE
)-startup.el
>>$(startupfile
) ;\
111 postscript
: $(PACKAGE
).ps
115 $(CP
) *.
dvi $(docdir
)/
117 install: install_elc install_info
# install_el
120 $(RM
) *~ core .\
#* $(TEXEXTS)
126 $(RM
) *.elc
*.
dvi *.
info* *.ps
128 ######################################################################
129 ### don't look below ###
130 ######################################################################
132 $(PACKAGE
)-startup.el
: $(ELFILES
)
134 $(EMACS
) --batch
--eval
'(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads
"."
138 TAG
= $(shell echo v
$(VERSION
) | tr
'.' '_')
139 ftpdir
=/home
/ftp
/pub
/monnier
/$(PACKAGE
)
142 cvs tag
-F
$(TAG
) &&\
144 cvs
export -r
$(TAG
) -d
$(PACKAGE
)-$(VERSION
) elisp
/$(PACKAGE
) &&\
145 cd
$(PACKAGE
)-$(VERSION
) &&\
148 ztar
$(PACKAGE
)-$(VERSION
) &&\
149 rm -rf
$(PACKAGE
)-$(VERSION
)
150 mv
$(TMP
)/$(PACKAGE
)-$(VERSION
).
tar.gz
$(ftpdir
)/
151 ln
-sf
$(PACKAGE
)-$(VERSION
).
tar.gz
$(ftpdir
)/$(PACKAGE
).
tar.gz
154 #ident @(#)$Name$:$Id$