]> code.delx.au - gnu-emacs/blob - Makefile.in
*** empty log message ***
[gnu-emacs] / Makefile.in
1 # DIST: This is the distribution Makefile for Emacs. configure can
2 # DIST: make most of the changes to this file you might want, so try
3 # DIST: that first.
4
5 # make all to compile and build Emacs.
6 # make install to install it.
7 # make install.sysv to install on system V. Note that on system V you
8 # must change mandir to /usr/local/man/man1.
9 # make install.xenix to install on Xenix.
10 # make install.aix to install on AIX.
11 # make tags to update tags tables.
12 #
13 # make distclean to delete everything that wasn't in the distribution.
14 # This is a very dangerous thing to do!
15 # make clean
16 # This is a little less dangerous.
17
18 SHELL = /bin/sh
19
20 # ==================== Where To Install Things ====================
21
22 # The default location for installation. Everything is placed in
23 # subdirectories of this directory. This directory must exist when
24 # you start installation. The default values for many of the
25 # variables below are expressed in terms of this one, so you may not
26 # need to change them.
27 prefix=/usr/local
28
29 # Where to install Emacs and other binaries that people will want to
30 # run directly (like etags).
31 bindir=$(prefix)/bin
32
33 # A directory under which we will install many of Emacs's files. The
34 # default values for many of the variables below are expressed in
35 # terms of this one, so you may not need to change them.
36 emacsdir=$(prefix)/emacs-19.0
37
38 # Where to install and expect the architecture-independent data files
39 # (like the tutorial and the Zippy database).
40 datadir=$(emacsdir)/etc
41
42 # Where to install the elisp files distributed with Emacs. Strictly
43 # speaking, all the elisp files should go under datadir (above), since
44 # both elisp source and compiled elisp are completely portable, but
45 # it's traditional to give the lisp files their own subdirectory.
46 lispdir=$(emacsdir)/lisp
47
48 # Directories Emacs should search for elisp files specific to this
49 # site (i.e. customizations), before consulting $(lispdir). This
50 # should be a colon-separated list of directories.
51 locallisppath=$(emacsdir)/local-lisp
52
53 # Where Emacs will search to find its elisp files. Before changing
54 # this, check to see if your purpose wouldn't better be served by
55 # changing locallisppath. This should be a colon-separated list of
56 # directories.
57 lisppath=$(locallisppath):$(lispdir)
58
59 # Where Emacs will search for its elisp files before dumping. This is
60 # only used during the process of compiling Emacs, to help Emacs find
61 # its lisp files before they've been installed in their final
62 # location. It's usually identical to lisppath, except that the entry
63 # for the directory containing the installed lisp files has been
64 # replaced with ../lisp. This should be a colon-separated list of
65 # directories.
66 dumplisppath=$(locallisppath):../lisp
67
68 # Where to install and expect the files that Emacs modifies as it
69 # runs. These files are all architecture-independent. Right now,
70 # the only such data is the locking directory.
71 statedir=$(emacsdir)
72
73 # Where to create and expect the locking directory, where the Emacs
74 # locking code keeps track of which files are currently being edited.
75 lockdir=$(statedir)/lock
76
77 # Where to install and expect executable files to be run by Emacs
78 # rather than directly by users, and other architecture-dependent
79 # data.
80 libdir=$(emacsdir)/arch-lib
81
82 # Where to install Emacs's man pages.
83 mandir=/usr/man/man1
84
85 # Where to install and expect the info files describing Emacs. In the
86 # past, this defaulted to a subdirectory of $(prefix)/lib/emacs, but
87 # since there are now many packages documented with the texinfo
88 # system, it is inappropriate to imply that it is part of Emacs.
89 infodir=$(prefix)/info
90
91
92 # ==================== Utility Programs for the Build ====================
93
94 # Allow the user to specify the install program.
95 INSTALL = install
96 INSTALLFLAGS = -c
97 INSTALL_PROGRAM = ${INSTALL}
98 INSTALL_DATA = ${INSTALL}
99
100
101 # ============================= Targets ==============================
102
103 # Flags passed down to subdirectory makefiles.
104 MFLAGS =
105
106 # Subdirectories to make recursively. `lisp' is not included
107 # because the compiled lisp files are part of the distribution
108 # and you cannot remake them without installing Emacs first.
109 SUBDIR = lib-src src
110
111 # Subdirectories to install, and where they'll go.
112 COPYDIR = arch-lib etc info lisp
113 COPYDESTS = $(libdir) $(datadir) $(infodir) $(lispdir)
114
115 all: src/paths.h ${SUBDIR}
116
117 removenullpaths=sed -e 's/^://' -e 's/:$$//' -e 's/::/:/'
118
119 src/paths.h: Makefile src/paths.h.in
120 lisppath=`echo $(lisppath) | $(removenullpaths)` ; \
121 dumplisppath=`echo $(dumplisppath) | $(removenullpaths)` ; \
122 /bin/sed < src/paths.h.in > src/paths.h \
123 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
124 -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${dumplisppath}'";' \
125 -e 's;\(#.*PATH_EXEC\).*$$;\1 "$(libdir)";' \
126 -e 's;\(#.*PATH_DATA\).*$$;\1 "$(datadir)";' \
127 -e 's;\(#.*PATH_LOCK\).*$$;\1 "$(lockdir)/";' \
128 -e 's;\(#.*PATH_SUPERLOCK\).*$$;\1 "$(lockdir)/!!!SuperLock!!!";'
129
130 src: lib-src
131
132 .RECURSIVE: ${SUBDIR}
133
134 ${SUBDIR}: FRC
135 cd $@; make ${MFLAGS} all
136
137 install: all mkdir lockdir
138 -set ${COPYDESTS} ; \
139 for dir in ${COPYDIR} ; do \
140 dest=$$1 ; shift ; \
141 if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
142 (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xf - ) ; \
143 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
144 rm -rf $${subdir}/RCS ; \
145 rm -f $${subdir}/\#* ; \
146 rm -f $${subdir}/*~ ; \
147 done ; \
148 fi ; \
149 done
150 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c arch-lib/emacsclient ${bindir}/emacsclient
151 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c arch-lib/etags ${bindir}/etags
152 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c arch-lib/ctags ${bindir}/ctags
153 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c -m 1755 src/xemacs ${bindir}/xemacs
154 ${INSTALL_DATA} ${INSTALLFLAGS} -c -m 444 etc/emacs.1 ${mandir}/emacs.1
155 -rm -f ${bindir}/emacs
156 mv ${bindir}/xemacs ${bindir}/emacs
157
158 install.sysv: all mkdir lockdir
159 -set ${COPYDESTS} ; \
160 for dir in ${COPYDIR} ; do \
161 dest=$$1 ; shift ; \
162 if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
163 (cd $${dir}; find . -print | cpio -pdum ${dest} ) ; \
164 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
165 rm -rf $${subdir}/RCS ; \
166 rm -f $${subdir}/\#* ; \
167 rm -f $${subdir}/*~ ; \
168 done ; \
169 fi ; \
170 done
171 -cpset arch-lib/emacsclient ${bindir}/emacsclient 755 bin bin
172 -cpset arch-lib/etags ${bindir}/etags 755 bin bin
173 -cpset arch-lib/ctags ${bindir}/ctags 755 bin bin
174 -cpset etc/emacs.1 ${mandir}/emacs.1 444 bin bin
175 -/bin/rm -f ${bindir}/emacs
176 -cpset src/xemacs ${bindir}/emacs 1755 bin bin
177
178 install.xenix: all mkdir lockdir
179 -set ${COPYDESTS} ; \
180 for dir in ${COPYDIR} ; do \
181 dest=$$1 ; shift ; \
182 if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
183 (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xpf - ) ; \
184 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
185 rm -rf $${subdir}/RCS ; \
186 rm -f $${subdir}/\#* ; \
187 rm -f $${subdir}/*~ ; \
188 done ; \
189 fi ; \
190 done
191 cp arch-lib/etags arch-lib/ctags arch-lib/emacsclient ${bindir}
192 chmod 755 ${bindir}/etags ${bindir}/ctags ${bindir}/emacsclient
193 cp etc/emacs.1 ${mandir}/emacs.1
194 chmod 444 ${mandir}/emacs.1
195 -mv -f ${bindir}/emacs ${bindir}/emacs.old
196 cp src/xemacs ${bindir}/emacs
197 chmod 1755 ${bindir}/emacs
198 -rm -f ${bindir}/emacs.old
199
200 install.aix: all mkdir lockdir
201 -set ${COPYDESTS} ; \
202 for dir in ${COPYDIR} ; do \
203 dest=$$1 ; shift ; \
204 if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
205 (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xBf - ) ; \
206 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
207 rm -rf $${subdir}/RCS ; \
208 rm -f $${subdir}/\#* ; \
209 rm -f $${subdir}/*~ ; \
210 done ; \
211 fi ; \
212 done
213 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -f ${bindir} etc/emacsclient
214 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -f ${bindir} etc/etags
215 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -f ${bindir} etc/ctags
216 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -M 1755 -f ${bindir} src/xemacs
217 ${INSTALL_DATA} ${INSTALLFLAGS} -M 444 -f ${mandir} etc/emacs.1
218 -rm -f ${bindir}/emacs
219 mv ${bindir}/xemacs ${bindir}/emacs
220
221 # Build all the directories
222 mkdir: FRC
223 # If any of the directories are below ${emacsdir}, create it.
224 -for dir in ${COPYDESTS}; do \
225 case "$${dir}" in \
226 ${emacsdir}/* ) \
227 if [ ! -d ${emacsdir} ]; then \
228 -mkdir ${emacsdir} ; \
229 -chmod 777 ${emacsdir} ; \
230 fi ; \
231 break\
232 ;; \
233 esac ; \
234 done
235 -mkdir ${COPYDESTS}
236 -chmod 777 ${COPYDESTS}
237
238 lockdir:
239 # If the lockdir needs ${emacsdir}, create it.
240 -case "${lockdir}" in \
241 ${statedir}/* ) \
242 if [ ! -d ${emacsdir} ]; then \
243 -mkdir ${emacsdir} ; \
244 -chmod 777 ${emacsdir} ; \
245 fi \
246 ;; \
247 esac
248 -mkdir ${LOCKDIR}
249 -chmod 777 ${LOCKDIR}
250
251 FRC:
252
253 clean mostlyclean:
254 cd src; make clean
255 if [ `/bin/pwd` != `(cd ${DESTDIR}${LIBDIR}; /bin/pwd)` ] ; then \
256 cd etc; make clean; \
257 else true; \
258 fi
259 cd oldXMenu; make clean
260
261 distclean:
262 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} distclean); done
263 -(cd lock; rm *)
264 -rm config.status config-tmp-*
265 -rm #*# *~
266
267 realclean:
268 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} realclean); done
269 (cd lock; rm *)
270 rm config.status
271
272 TAGS tags: lib-src
273 cd src; ../arch-lib/etags *.[ch] ../lisp/*.el ../lisp/term/*.el
274
275 check:
276 @echo "We don't have any tests for GNU Emacs yet."