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