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