]> code.delx.au - gnu-emacs-elpa/blob - packages/sml-mode/Makefile
Add SML-mode.
[gnu-emacs-elpa] / packages / sml-mode / Makefile
1 # Makefile for emacs-lisp package
2
3 # Copyright (C) 1998,1999,2004,2007,2010-2012 Stefan Monnier <monnier@gnu.org>
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 3, 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 # load the package-specific settings
20 include makefile.pkg
21
22 # set up the usual installation paths
23 prefix = /usr/local
24 datadir = $(prefix)/share
25
26 # the directory where you install third-party emacs packges
27 lispdir = $(datadir)/emacs/site-lisp
28
29 # the directory where the .elc files will be installed
30 elcdir = $(lispdir)/$(PACKAGE)
31 # the directory where the .el files will be installed
32 eldir = $(elcdir)
33
34 # the file where the initialization goes.
35 #startupfile = $(HOME/.emacs
36 startupfile = $(lispdir)/site-start.el
37
38 # the directory where you installed the elib .elc files.
39 # This is only needed if your site-start.el (or default.el) does not
40 # set up elib correctly.
41 elibdir = $(lispdir)/elib
42
43 # the directory where you install the info doc
44 infodir = $(prefix)/info
45 docdir = $(prefix)/doc
46
47 EMACS = emacs
48 MAKEINFO= makeinfo
49 TEXI2DVI= texi2dvi
50 SHELL = /bin/sh
51 DVIPS = dvips
52 CP = cp
53 RM = rm -f
54 MKDIR = mkdir -p
55 ETAGS = etags
56
57 ######################################################################
58 ### No changes below this line should be necessary ###
59 ######################################################################
60
61 ELFLAGS = --eval '(setq load-path (append (list "." "$(elibdir)" "$(lispdir)") load-path))'
62 ELC = $(EMACS) -batch $(ELFLAGS) -f batch-byte-compile
63
64 ELCFILES = $(ELFILES:.el=.elc)
65
66 TEXEXTS = *.cps *.fns *.kys *.vr *.tp *.pg *.log *.aux *.toc *.cp *.ky *.fn
67
68 .SUFFIXES: .elc .el .info .ps .dvi .texi
69 .PHONY: elcfiles info clean distclean default
70 .PHONY: install_startup install_elc install install_el install_info
71 .PHONY: dvi postscript
72
73 .el.elc:
74 $(ELC) $<
75
76 .texi.info:
77 $(MAKEINFO) $<
78
79 .texi.dvi:
80 $(TEXI2DVI) $<
81
82 .dvi.ps:
83 $(DVIPS) -f $< >$@
84
85 ######################################################################
86
87 default: elcfiles
88
89 elcfiles: $(ELCFILES)
90 info: $(PACKAGE).info
91
92 install_elc: $(ELCFILES) $(PACKAGE)-startup.el
93 $(MKDIR) $(elcdir)
94 for f in $(ELCFILES) $(PACKAGE)-startup.el; do \
95 $(CP) $$f $(elcdir)/$$f ;\
96 done
97
98 install_el:
99 $(MKDIR) $(eldir)
100 for f in $(ELFILES); do \
101 $(CP) $$f $(eldir)/$$f ;\
102 done
103
104 install_info: $(PACKAGE).info
105 $(MKDIR) $(infodir)
106 $(CP) *.info* $(infodir)/
107 -[ ! -w $(infodir)/dir ] \
108 || install-info --info-dir=$(infodir)/dir $(PACKAGE).info
109
110 install_startup:
111 $(MKDIR) $(lispdir)
112 @if grep $(PACKAGE) $(lispdir)/site-start.el >/dev/null 2>&1 || \
113 grep $(PACKAGE) $(startupfile) >/dev/null 2>&1 || \
114 grep $(PACKAGE) $(lispdir)/default.el >/dev/null 2>&1; \
115 then \
116 echo "**********************************************************" ;\
117 echo "*** It seems you already have some setup code" ;\
118 echo "*** for $(PACKAGE) in your startup files." ;\
119 echo "*** Check that it properly loads \"$(PACKAGE)-startup\"" ;\
120 echo "**********************************************************" ;\
121 else \
122 echo 'echo ";; load $(PACKAGE) setup code" >>$(startupfile)' ;\
123 echo ";; load $(PACKAGE) setup code" >>$(startupfile) ;\
124 echo 'echo "(load \"$(elcdir)/$(PACKAGE)-startup\")" >>$(startupfile)' ;\
125 echo "(load \"$(elcdir)/$(PACKAGE)-startup\")" >>$(startupfile) ;\
126 fi
127
128 postscript: $(PACKAGE).ps
129 dvi: $(PACKAGE).dvi
130 install_dvi: dvi
131 $(MKDIR) $(docdir)
132 $(CP) `find . -type f -name '*.dvi' -print` $(docdir)/
133
134 install: install_elc install_info install_startup install_el
135
136 clean:
137 $(RM) *~ core .\#* $(TEXEXTS)
138
139 TAGS tags:
140 $(ETAGS) $(ELFILES)
141
142 distclean: clean
143 $(RM) *.elc *.dvi *.info* *.ps
144
145 ######################################################################
146 ### don't look below ###
147 ######################################################################
148
149 $(PACKAGE)-startup.el: $(ELFILES)
150 echo "\
151 ;;; $@ --- automatically extracted autoloads\n\
152 ;;; Code:\n\
153 (add-to-list 'load-path\n\
154 (or (file-name-directory load-file-name) (car load-path)))\n\
155 \f" >$@
156 $(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "."
157
158 ##
159
160 #TAG = $(shell echo v$(VERSION) | tr '.' '_')
161 URL=$(shell sed -n -e '5p' .svn/entries)
162 #TAG=$(shell dirname "$(URL)")/releases/$(PACKAGE)-$(VERSION)
163 TAG="v$(VERSION)"
164 ftpdir=/u/monnier/html/elisp/
165 cvsmodule=$(shell cat CVS/Repository)
166 cvsroot=$(shell cat CVS/Root)
167
168 dist:
169 echo bzr tag "$(TAG)" &&\
170 bzr export "$(TMP)/$(PACKAGE)-$(VERSION)" &&\
171 cd "$(TMP)/$(PACKAGE)-$(VERSION)" &&\
172 $(MAKE) info $(PACKAGE)-startup.el &&\
173 cd .. &&\
174 ztar $(PACKAGE)-$(VERSION) &&\
175 rm -rf $(PACKAGE)-$(VERSION)
176 mv $(TMP)/$(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/
177 ln -sf $(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/$(PACKAGE).tar.gz