Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml-mode/trunk/Makefile
ViewVC logotype

Annotation of /sml-mode/trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2817 - (view) (download)

1 : monnier 319 # Makefile for emacs-lisp package
2 : monnier 300
3 : monnier 2817 # Copyright (C) 1998, 1999, 2004, 2007 Stefan Monnier <monnier@gnu.org>
4 : monnier 535
5 : monnier 319 # 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 : monnier 2817 # Free Software Foundation; either version 3, or (at your option) any
8 : monnier 319 # later version.
9 : monnier 300
10 : monnier 319 # 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 : monnier 300
15 : monnier 394 # 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 : monnier 535 # load the package-specific settings
20 :     include makefile.pkg
21 :    
22 :     # set up the usual installation paths
23 : monnier 319 prefix = /usr/local
24 : monnier 394 datadir = $(prefix)/share
25 : monnier 319
26 :     # the directory where you install third-party emacs packges
27 : monnier 394 lispdir = $(datadir)/emacs/site-lisp
28 : monnier 535
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 : monnier 395 startupfile = $(lispdir)/site-start.el
37 : monnier 319
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 : monnier 394 EMACS = emacs
48 :     MAKEINFO= makeinfo
49 :     TEXI2DVI= texi2dvi
50 :     SHELL = /bin/sh
51 :     DVIPS = dvips
52 :     CP = cp
53 : monnier 535 RM = rm -f
54 : monnier 394 MKDIR = mkdir -p
55 :     ETAGS = etags
56 :    
57 : monnier 319 ######################################################################
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 : monnier 395 .PHONY: dvi postscript
72 : monnier 319
73 :     .el.elc:
74 :     $(ELC) $<
75 :    
76 :     .texi.info:
77 : monnier 394 $(MAKEINFO) $<
78 : monnier 319
79 :     .texi.dvi:
80 : monnier 394 $(TEXI2DVI) $<
81 : monnier 319
82 :     .dvi.ps:
83 : monnier 394 $(DVIPS) -f $< >$@
84 : monnier 319
85 :     ######################################################################
86 :    
87 :     default: elcfiles
88 :    
89 :     elcfiles: $(ELCFILES)
90 :     info: $(PACKAGE).info
91 :    
92 : monnier 535 install_elc: $(ELCFILES) $(PACKAGE)-startup.el
93 : monnier 394 $(MKDIR) $(elcdir)
94 : monnier 535 for f in $(ELCFILES) $(PACKAGE)-startup.el; do \
95 :     $(CP) $$f $(elcdir)/$$f ;\
96 :     done
97 : monnier 319
98 :     install_el:
99 : monnier 394 $(MKDIR) $(eldir)
100 : monnier 535 for f in $(ELFILES); do \
101 :     $(CP) $$f $(eldir)/$$f ;\
102 :     done
103 : monnier 319
104 :     install_info: $(PACKAGE).info
105 : monnier 394 $(MKDIR) $(infodir)
106 :     $(CP) *.info* $(infodir)/
107 : monnier 535 -[ ! -w $(infodir)/dir ] \
108 :     || install-info --info-dir=$(infodir)/dir $(PACKAGE).info
109 : monnier 319
110 :     install_startup:
111 : monnier 394 $(MKDIR) $(lispdir)
112 : monnier 535 @if grep $(PACKAGE) $(lispdir)/site-start.el >/dev/null 2>&1 || \
113 :     grep $(PACKAGE) $(startupfile) >/dev/null 2>&1 || \
114 : monnier 394 grep $(PACKAGE) $(lispdir)/default.el >/dev/null 2>&1; then \
115 : monnier 535 echo "**********************************************************" ;\
116 :     echo "*** It seems you already have some setup code" ;\
117 :     echo "*** for $(PACKAGE) in your startup files." ;\
118 :     echo "*** Check that it properly loads \"$(PACKAGE)-startup\"" ;\
119 :     echo "**********************************************************" ;\
120 : monnier 394 else \
121 : monnier 535 echo 'echo ";; load $(PACKAGE) setup code" >>$(startupfile)' ;\
122 :     echo ";; load $(PACKAGE) setup code" >>$(startupfile) ;\
123 : monnier 1690 echo 'echo "(load \"$(elcdir)/$(PACKAGE)-startup\")" >>$(startupfile)' ;\
124 :     echo "(load \"$(elcdir)/$(PACKAGE)-startup\")" >>$(startupfile) ;\
125 : monnier 319 fi
126 :    
127 : monnier 395 postscript: $(PACKAGE).ps
128 :     dvi: $(PACKAGE).dvi
129 :     install_dvi: dvi
130 : monnier 394 $(MKDIR) $(docdir)
131 : monnier 535 $(CP) `find . -type f -name '*.dvi' -print` $(docdir)/
132 : monnier 319
133 : monnier 769 install: install_elc install_info install_startup install_el
134 : monnier 319
135 :     clean:
136 : monnier 394 $(RM) *~ core .\#* $(TEXEXTS)
137 : monnier 319
138 : monnier 394 TAGS tags:
139 :     $(ETAGS) $(ELFILES)
140 :    
141 : monnier 319 distclean: clean
142 :     $(RM) *.elc *.dvi *.info* *.ps
143 :    
144 :     ######################################################################
145 :     ### don't look below ###
146 :     ######################################################################
147 :    
148 : monnier 535 $(PACKAGE)-startup.el: $(ELFILES)
149 :     [ -f $@ ] || echo ' ' >$@
150 : monnier 378 $(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "."
151 :    
152 :     ##
153 :    
154 : monnier 319 TAG = $(shell echo v$(VERSION) | tr '.' '_')
155 : monnier 1714 ftpdir=/u/monnier/html/elisp/
156 : monnier 770 cvsmodule=$(shell cat CVS/Repository)
157 :     cvsroot=$(shell cat CVS/Root)
158 : monnier 319
159 :     dist:
160 :     cvs tag -F $(TAG) &&\
161 :     cd $(TMP) &&\
162 : monnier 769 cvs -d $(cvsroot) export -r $(TAG) -d $(PACKAGE)-$(VERSION) $(cvsmodule) &&\
163 : monnier 319 cd $(PACKAGE)-$(VERSION) &&\
164 : monnier 535 gmake info $(PACKAGE)-startup.el &&\
165 : monnier 319 cd .. &&\
166 :     ztar $(PACKAGE)-$(VERSION) &&\
167 :     rm -rf $(PACKAGE)-$(VERSION)
168 :     mv $(TMP)/$(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/
169 :     ln -sf $(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/$(PACKAGE).tar.gz

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0