]> code.delx.au - gnu-emacs-elpa/blob - Makefile
2b40316fcb7b713a59523b1c2b853a2851b1048b
[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
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 $(PACKAGE)-startup.el: $(ELFILES)
65 $(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "."
66
67 ######################################################################
68
69 default: elcfiles
70
71 elcfiles: $(ELCFILES)
72 info: $(PACKAGE).info
73
74 install_elc: $(ELCFILES)
75 mkdir -p $(elcdir)
76 cp $(ELCFILES) $(elcdir)/
77
78 install_el:
79 mkdir -p $(eldir)
80 cp $(ELFILES) $(eldir)/
81
82 install_info: $(PACKAGE).info
83 mkdir -p $(infodir)
84 cp *.info* $(infodir)/
85 -[ ! -w $(infodir)/dir ] || install-info $(PACKAGE).info $(infodir)/dir
86
87 install_startup:
88 mkdir -p $(lispdir)
89 if grep $(PACKAGE) $(lispdir)/site-start.el >/dev/null 2>&1 || \
90 grep $(PACKAGE) $(lispdir)/default.el >/dev/null 2>&1; then :; else \
91 sed 's/@elcdir@/$(elcdir)/' \
92 $(PACKAGE)-startup.el >>$(lispdir)/site-start.el ;\
93 fi
94
95 install_dvi: $(PACKAGE).dvi
96 mkdir -p $(docdir)
97 cp *.dvi $(docdir)/
98
99 install: install_elc install_info # install_el
100
101 clean:
102 $(RM) .\#* $(TEXEXTS)
103
104 distclean: clean
105 $(RM) *.elc *.dvi *.info* *.ps
106
107 ######################################################################
108 ### don't look below ###
109 ######################################################################
110
111 TAG = $(shell echo v$(VERSION) | tr '.' '_')
112 ftpdir=/home/ftp/pub/monnier/$(PACKAGE)
113
114 dist:
115 cvs tag -F $(TAG) &&\
116 cd $(TMP) &&\
117 cvs export -r $(TAG) -d $(PACKAGE)-$(VERSION) elisp/$(PACKAGE) &&\
118 cd $(PACKAGE)-$(VERSION) &&\
119 gmake info &&\
120 cd .. &&\
121 ztar $(PACKAGE)-$(VERSION) &&\
122 rm -rf $(PACKAGE)-$(VERSION)
123 mv $(TMP)/$(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/
124 ln -sf $(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/$(PACKAGE).tar.gz
125
126
127 #ident @(#)$Name$:$Id$