]> code.delx.au - gnu-emacs-elpa/blob - Makefile
* sml-mode.texi: somewhat updated the doc.
[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 startupfile = $(lispdir)/site-start.el
25
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
30
31 # the directory where you install the info doc
32 infodir = $(prefix)/info
33 docdir = $(prefix)/doc
34
35 EMACS = emacs
36 MAKEINFO= makeinfo
37 TEXI2DVI= texi2dvi
38 SHELL = /bin/sh
39 DVIPS = dvips
40 CP = cp
41 MKDIR = mkdir -p
42 ETAGS = etags
43
44 ######################################################################
45 ### No changes below this line should be necessary ###
46 ######################################################################
47
48 PACKAGE = sml-mode
49
50 # the directory where the .elc files will be installed
51 elcdir = $(lispdir)/$(PACKAGE)
52 eldir = $(elcdir)
53
54 ELFLAGS = --eval '(setq load-path (append (list "." "$(elibdir)" "$(lispdir)") load-path))'
55 ELC = $(EMACS) -batch $(ELFLAGS) -f batch-byte-compile
56
57 ELFILES = sml-compat.el sml-util.el sml-defs.el sml-move.el sml-mode.el \
58 sml-proc.el
59 ELCFILES = $(ELFILES:.el=.elc)
60
61 TEXEXTS = *.cps *.fns *.kys *.vr *.tp *.pg *.log *.aux *.toc *.cp *.ky *.fn
62
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
67
68 .el.elc:
69 $(ELC) $<
70
71 .texi.info:
72 $(MAKEINFO) $<
73
74 .texi.dvi:
75 $(TEXI2DVI) $<
76
77 .dvi.ps:
78 $(DVIPS) -f $< >$@
79
80 ######################################################################
81
82 default: elcfiles
83
84 elcfiles: $(ELCFILES)
85 info: $(PACKAGE).info
86
87 install_elc: $(ELCFILES)
88 $(MKDIR) $(elcdir)
89 $(CP) $(ELCFILES) $(elcdir)/
90
91 install_el:
92 $(MKDIR) $(eldir)
93 $(CP) $(ELFILES) $(eldir)/
94
95 install_info: $(PACKAGE).info
96 $(MKDIR) $(infodir)
97 $(CP) *.info* $(infodir)/
98 -[ ! -w $(infodir)/dir ] || install-info $(PACKAGE).info $(infodir)/dir
99
100 install_startup:
101 $(MKDIR) $(lispdir)
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"; \
106 else \
107 sed 's|@elcdir@|$(elcdir)|' \
108 $(PACKAGE)-startup.el >>$(startupfile) ;\
109 fi
110
111 postscript: $(PACKAGE).ps
112 dvi: $(PACKAGE).dvi
113 install_dvi: dvi
114 $(MKDIR) $(docdir)
115 $(CP) *.dvi $(docdir)/
116
117 install: install_elc install_info # install_el
118
119 clean:
120 $(RM) *~ core .\#* $(TEXEXTS)
121
122 TAGS tags:
123 $(ETAGS) $(ELFILES)
124
125 distclean: clean
126 $(RM) *.elc *.dvi *.info* *.ps
127
128 ######################################################################
129 ### don't look below ###
130 ######################################################################
131
132 $(PACKAGE)-startup.el: $(ELFILES)
133 chmod +w $@
134 $(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "."
135
136 ##
137
138 TAG = $(shell echo v$(VERSION) | tr '.' '_')
139 ftpdir=/home/ftp/pub/monnier/$(PACKAGE)
140
141 dist:
142 cvs tag -F $(TAG) &&\
143 cd $(TMP) &&\
144 cvs export -r $(TAG) -d $(PACKAGE)-$(VERSION) elisp/$(PACKAGE) &&\
145 cd $(PACKAGE)-$(VERSION) &&\
146 gmake info &&\
147 cd .. &&\
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
152
153
154 #ident @(#)$Name$:$Id$