Commit | Line | Data |
---|---|---|
46947372 JB |
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. | |
86a5659e | 4 | |
46947372 JB |
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. | |
badb0a97 | 10 | # make install.aix to install on AIX. |
78008d14 | 11 | # make TAGS to update tags tables. |
86a5659e | 12 | # |
78008d14 JB |
13 | # make clean or make mostlyclean |
14 | # Delete all files from the current directory that are normally | |
868e080d | 15 | # created by building the program. Don't delete the files that |
78008d14 JB |
16 | # record the configuration. Also preserve files that could be made |
17 | # by building, but normally aren't because the distribution comes | |
18 | # with them. | |
19 | # | |
20 | # Delete `.dvi' files here if they are not part of the distribution. | |
21 | # | |
22 | # make distclean | |
23 | # Delete all files from the current directory that are created by | |
24 | # configuring or building the program. If you have unpacked the | |
25 | # source and built the program without creating any other files, | |
26 | # `make distclean' should leave only the files that were in the | |
27 | # distribution. | |
28 | # | |
29 | # make realclean | |
30 | # Delete everything from the current directory that can be | |
31 | # reconstructed with this Makefile. This typically includes | |
32 | # everything deleted by distclean, plus more: C source files | |
33 | # produced by Bison, tags tables, info files, and so on. | |
34 | # | |
35 | # make extraclean | |
36 | # Still more severe - delete backup and autosave files, too. | |
86a5659e JB |
37 | |
38 | SHELL = /bin/sh | |
08edea3c | 39 | MAKE = make # BSD doesn't have it as a default. |
86a5659e | 40 | |
78008d14 | 41 | # ==================== Things `configure' Might Edit ==================== |
86a5659e | 42 | |
c75ff9db | 43 | CC=@CC@ |
c75ff9db | 44 | C_SWITCH_SYSTEM=@c_switch_system@ |
d3245f70 | 45 | ALLOCA=@ALLOCA@ |
b6472fc1 JB |
46 | LN_S=@LN_S@ |
47 | CFLAGS=@CFLAGS@ | |
78008d14 JB |
48 | |
49 | ### These help us choose version- and architecture-specific directories | |
50 | ### to install files in. | |
51 | ||
52 | ### This should be the number of the Emacs version we're building, | |
53 | ### like `18.59' or `19.0'. | |
c75ff9db | 54 | version=@version@ |
78008d14 JB |
55 | |
56 | ### This should be the name of the configuration we're building Emacs | |
57 | ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'. | |
c75ff9db JB |
58 | configuration=@configuration@ |
59 | ||
60 | ### Libraries which should be edited into lib-src/Makefile. | |
61 | libsrc_libs=@libsrc_libs@ | |
0c22fbca | 62 | |
78008d14 JB |
63 | # ==================== Where To Install Things ==================== |
64 | ||
46947372 | 65 | # The default location for installation. Everything is placed in |
78008d14 JB |
66 | # subdirectories of this directory. The default values for many of |
67 | # the variables below are expressed in terms of this one, so you may | |
68 | # not need to change them. | |
46947372 | 69 | prefix=/usr/local |
86a5659e | 70 | |
78008d14 JB |
71 | # Like `prefix', but used for architecture-specific files. |
72 | exec_prefix=${prefix} | |
73 | ||
46947372 JB |
74 | # Where to install Emacs and other binaries that people will want to |
75 | # run directly (like etags). | |
78008d14 | 76 | bindir=${exec_prefix}/bin |
86a5659e | 77 | |
868e080d | 78 | # Where to install architecture-independent data files. ${lispdir} |
78008d14 JB |
79 | # and ${etcdir} are subdirectories of this. |
80 | datadir=${prefix}/lib | |
0c22fbca JB |
81 | |
82 | # Where to install and expect the files that Emacs modifies as it | |
868e080d | 83 | # runs. These files are all architecture-independent. Right now, the |
78008d14 JB |
84 | # only such data is the locking directory; ${lockdir} is a |
85 | # subdirectory of this. | |
86 | statedir=${prefix}/lib | |
0c22fbca JB |
87 | |
88 | # Where to install and expect executable files to be run by Emacs | |
89 | # rather than directly by users, and other architecture-dependent | |
868e080d | 90 | # data. ${archlibdir} is a subdirectory of this. |
78008d14 | 91 | libdir=${exec_prefix}/lib |
0c22fbca JB |
92 | |
93 | # Where to install Emacs's man pages, and what extension they should have. | |
78008d14 | 94 | mandir=${prefix}/man/man1 |
0c22fbca JB |
95 | manext=.1 |
96 | ||
97 | # Where to install and expect the info files describing Emacs. In the | |
98 | # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but | |
99 | # since there are now many packages documented with the texinfo | |
100 | # system, it is inappropriate to imply that it is part of Emacs. | |
101 | infodir=${prefix}/info | |
86a5659e | 102 | |
78008d14 JB |
103 | # Where to find the source code - setting this to anything but |
104 | # . doesn't work yet. The source code for Emacs's C kernel is | |
105 | # expected to be in ${srcdir}/src, and the source code for Emacs's | |
106 | # utility programs is expected to be in ${srcdir}/lib-src. This is | |
107 | # set by the configure script's `--srcdir' option. | |
d3245f70 | 108 | srcdir=@srcdir@ |
86a5659e | 109 | |
0c22fbca JB |
110 | # ==================== Emacs-specific directories ==================== |
111 | ||
78008d14 JB |
112 | # These variables hold the values Emacs will actually use. They are |
113 | # based on the values of the standard Make variables above. | |
114 | ||
d3245f70 JB |
115 | @inst_paths@# Where to install the lisp files distributed with |
116 | @inst_paths@# Emacs. This includes the Emacs version, so that the | |
117 | @inst_paths@# lisp files for different versions of Emacs will install | |
118 | @inst_paths@# themselves in separate directories. | |
119 | @inst_paths@lispdir=${datadir}/emacs/${version}/lisp | |
120 | ||
121 | @inst_paths@# Where to install the lisp files which are distributed | |
122 | @inst_paths@# with Emacs but not maintained by the FSF. This | |
123 | @inst_paths@# includes the Emacs version, so that the lisp files for | |
124 | @inst_paths@# different versions of Emacs will install themselves in | |
125 | @inst_paths@# separate directories. | |
126 | @inst_paths@externallispdir=${datadir}/emacs/${version}/external-lisp | |
127 | ||
128 | @inst_paths@# Directories Emacs should search for lisp files specific | |
129 | @inst_paths@# to this site (i.e. customizations), before consulting | |
130 | @inst_paths@# ${lispdir}. This should be a colon-separated list of | |
131 | @inst_paths@# directories. | |
132 | @inst_paths@locallisppath=${datadir}/emacs/site-lisp | |
133 | ||
134 | # Where Emacs will search to find its lisp files. Before | |
135 | # changing this, check to see if your purpose wouldn't | |
136 | # better be served by changing locallisppath. This | |
46947372 | 137 | # should be a colon-separated list of directories. |
ab8478d1 | 138 | lisppath=${locallisppath}:${lispdir} |
86a5659e | 139 | |
d3245f70 JB |
140 | # Where Emacs will search for its lisp files while |
141 | # building. This is only used during the process of | |
142 | # compiling Emacs, to help Emacs find its lisp files | |
143 | # before they've been installed in their final location. | |
144 | # It's usually identical to lisppath, except that the | |
145 | # entry for the directory containing the installed lisp | |
146 | # files has been replaced with ../lisp. This should be a | |
147 | # colon-separated list of directories. | |
4746118a | 148 | buildlisppath=../lisp |
86a5659e | 149 | |
d3245f70 JB |
150 | @inst_paths@# Where to install the other architecture-independent |
151 | @inst_paths@# data files distributed with Emacs (like the tutorial, | |
152 | @inst_paths@# the cookie recipes and the Zippy database). This path | |
153 | @inst_paths@# usually contains the Emacs version number, so the data | |
154 | @inst_paths@# files for multiple versions of Emacs may be installed | |
155 | @inst_paths@# at once. | |
156 | @inst_paths@etcdir=${datadir}/emacs/${version}/etc | |
157 | ||
158 | @inst_paths@# Where to create and expect the locking directory, where | |
159 | @inst_paths@# the Emacs locking code keeps track of which files are | |
160 | @inst_paths@# currently being edited. | |
161 | @inst_paths@lockdir=${statedir}/emacs/lock | |
162 | ||
163 | @inst_paths@# Where to put executables to be run by Emacs rather than | |
164 | @inst_paths@# the user. This path usually includes the Emacs version | |
165 | @inst_paths@# and configuration name, so that multiple configurations | |
166 | @inst_paths@# for multiple versions of Emacs may be installed at | |
167 | @inst_paths@# once. | |
168 | @inst_paths@archlibdir=${libdir}/emacs/${version}/${configuration} | |
46947372 | 169 | |
a34902ab ER |
170 | # ====================== Developer's configuration ======================= |
171 | ||
172 | # The following assignments make sense if you're running Emacs on a single | |
173 | # machine, one version at a time, and you want changes to the lisp and etc | |
174 | # directories in the source tree to show up immediately in your working | |
175 | # environment. It saves a great deal of disk space by not duplicating the | |
176 | # lisp and etc directories. | |
d3245f70 JB |
177 | |
178 | @rip_paths@lispdir=${srcdir}/lisp | |
179 | @rip_paths@externallispdir=${srcdir}/externallisp | |
180 | @rip_paths@locallisppath=${datadir}/emacs/site-lisp | |
181 | @rip_paths@etcdir=${srcdir}/etc | |
182 | @rip_paths@lockdir=${srcdir}/lock | |
183 | @rip_paths@archlibdir=${srcdir}/lib-src | |
184 | @rip_paths@infodir=${srcdir}/info | |
a34902ab | 185 | |
46947372 JB |
186 | # ==================== Utility Programs for the Build ==================== |
187 | ||
188 | # Allow the user to specify the install program. | |
189 | INSTALL = install | |
190 | INSTALLFLAGS = -c | |
191 | INSTALL_PROGRAM = ${INSTALL} | |
192 | INSTALL_DATA = ${INSTALL} | |
193 | ||
46947372 | 194 | # ============================= Targets ============================== |
86a5659e JB |
195 | |
196 | # Flags passed down to subdirectory makefiles. | |
78008d14 JB |
197 | MFLAGS = |
198 | ||
86a5659e JB |
199 | # Subdirectories to make recursively. `lisp' is not included |
200 | # because the compiled lisp files are part of the distribution | |
201 | # and you cannot remake them without installing Emacs first. | |
46947372 | 202 | SUBDIR = lib-src src |
86a5659e | 203 | |
78008d14 | 204 | # The makefiles of the directories in $SUBDIR. |
ddb73021 | 205 | SUBDIR_MAKEFILES = lib-src/Makefile src/Makefile oldXMenu/Makefile |
78008d14 | 206 | |
83f6a565 JB |
207 | # Subdirectories to install, and where they'll go. |
208 | # lib-src's makefile knows how to install it, so we don't do that here. | |
209 | # When installing the info files, we need to do special things to | |
210 | # avoid nuking an existing dir file, so we don't do that here; | |
211 | # instead, we have written out explicit code in the `install' targets. | |
ddb73021 JB |
212 | COPYDIR = etc ${srcdir}/etc ${srcdir}/lisp ${srcdir}/external-lisp |
213 | COPYDESTS = ${etcdir} ${etcdir} ${lispdir} ${externallispdir} | |
86a5659e JB |
214 | |
215 | all: src/paths.h ${SUBDIR} | |
216 | ||
46947372 JB |
217 | removenullpaths=sed -e 's/^://' -e 's/:$$//' -e 's/::/:/' |
218 | ||
78008d14 JB |
219 | # We force the rebuilding of src/paths.h because the user might give |
220 | # make different values for the various directories. Since we use | |
221 | # move-if-change, src/paths.h only actually changes if the user did | |
222 | # something notable, so the only unnecessary work we do is in building | |
223 | # src/paths.h.tmp, which isn't much. | |
692f9ac6 | 224 | # Note that sed is not in /bin on 386bsd. |
78008d14 | 225 | src/paths.h: Makefile ${srcdir}/src/paths.h.in FRC |
7987a169 JB |
226 | @echo "Producing \`src/paths.h' from \`src/paths.h.in'." |
227 | @(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \ | |
228 | buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \ | |
229 | sed < ${srcdir}/src/paths.h.in > src/paths.h.tmp \ | |
230 | -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \ | |
231 | -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \ | |
232 | -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \ | |
233 | -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \ | |
234 | -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";') | |
c75ff9db | 235 | @${srcdir}/move-if-change src/paths.h.tmp src/paths.h |
86a5659e JB |
236 | |
237 | src: lib-src | |
238 | ||
239 | .RECURSIVE: ${SUBDIR} | |
240 | ||
78008d14 | 241 | ${SUBDIR}: ${SUBDIR_MAKEFILES} FRC |
08edea3c | 242 | cd $@; $(MAKE) all ${MFLAGS} \ |
ddb73021 | 243 | CC='${CC}' CFLAGS='${CFLAGS}' prefix='${prefix}' \ |
78008d14 JB |
244 | srcdir='${srcdir}/$@' libdir='${libdir}' |
245 | ||
246 | ## We build the makefiles for the subdirectories here so that we can | |
247 | ## edit the values for the path variables into them. This means that | |
248 | ## when the user has built them from this makefile once, they will use | |
249 | ## the right default values for the path variables. | |
250 | lib-src/Makefile: ${srcdir}/lib-src/Makefile.in Makefile | |
78008d14 | 251 | rm -f lib-src/Makefile.tmp |
7987a169 JB |
252 | @echo "Producing \`lib-src/Makefile' from \`${srcdir}/lib-src/Makefile.in'." |
253 | @(echo "# This file is generated from \`${srcdir}/lib-src/Makefile.in'." ; \ | |
254 | echo "# If you are thinking about editing it, you should seriously consider" ; \ | |
255 | echo "# running \`make lib-src/Makefile' at the top of the" ; \ | |
256 | echo "# Emacs build tree instead, or editing" ; \ | |
257 | echo "# \`${srcdir}/lib-src/Makefile.in' itself." ; \ | |
ddb73021 | 258 | sed < ${srcdir}/lib-src/Makefile.in \ |
7987a169 | 259 | -e 's|^\(version *=\).*$$|\1'"${version}"'|' \ |
c75ff9db | 260 | -e 's|^\(configname *=\).*$$|\1'"${configuration}"'|' \ |
7987a169 JB |
261 | -e 's|^\(prefix *=\).*$$|\1'"${prefix}"'|' \ |
262 | -e 's|^\(exec_prefix *=\).*$$|\1'"${exec_prefix}"'|' \ | |
263 | -e 's|^\(libdir *=\).*$$|\1'"${libdir}"'|' \ | |
ddb73021 JB |
264 | -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/lib-src|' \ |
265 | -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/lib-src|' \ | |
7987a169 | 266 | -e 's|^\(archlibdir *=\).*$$|\1'"${archlibdir}"'|' \ |
d3245f70 | 267 | -e 's|^\(ALLOCA *=\).*$$|\1'"${ALLOCA}"'|' \ |
7987a169 | 268 | -e 's|^CC *=.*$$|CC='"${CC}"'|' \ |
b6472fc1 | 269 | -e 's|^CFLAGS *=.*$$|CFLAGS='"${CFLAGS}"'|' \ |
7987a169 JB |
270 | -e 's|^C_SWITCH_SYSTEM *=.*$$|C_SWITCH_SYSTEM='"${C_SWITCH_SYSTEM}"'|' \ |
271 | -e 's|^LOADLIBES *=.*$$|LOADLIBES='"${libsrc_libs}"'|' \ | |
272 | -e '/^# DIST: /d') > lib-src/Makefile.tmp | |
c75ff9db | 273 | @${srcdir}/move-if-change lib-src/Makefile.tmp lib-src/Makefile |
78008d14 JB |
274 | chmod -w lib-src/Makefile |
275 | ||
276 | src/Makefile: ${srcdir}/src/Makefile.in Makefile | |
78008d14 | 277 | rm -f src/Makefile.tmp |
7987a169 JB |
278 | @echo "Producing \`src/Makefile' from \`${srcdir}/src/Makefile.in'." |
279 | @(echo "# This file is generated from \`${srcdir}/src/Makefile.in'." ; \ | |
280 | echo "# If you are thinking about editing it, you should seriously consider" ; \ | |
281 | echo "# running \`make src/Makefile' at the top of the" ; \ | |
282 | echo "# Emacs build tree instead, or editing" ; \ | |
283 | echo "# \`${srcdir}/src/Makefile.in' itself." ; \ | |
ddb73021 JB |
284 | sed < ${srcdir}/src/Makefile.in \ |
285 | -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/src|' \ | |
286 | -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/src|' \ | |
7987a169 | 287 | -e 's|^CC *=.*$$|CC='"${CC}"'|' \ |
b6472fc1 JB |
288 | -e 's|^LN_S *=.*$$|LN_S='"${LN_S}"'|' \ |
289 | -e 's|^CFLAGS *=.*$$|CFLAGS='"${CFLAGS}"'|' \ | |
7987a169 | 290 | -e '/^# DIST: /d') > src/Makefile.tmp |
c75ff9db | 291 | @${srcdir}/move-if-change src/Makefile.tmp src/Makefile |
78008d14 JB |
292 | chmod -w src/Makefile |
293 | ||
294 | oldXMenu/Makefile: ${srcdir}/oldXMenu/Makefile Makefile | |
6d8856bd | 295 | rm -f oldXMenu/Makefile.tmp |
ddb73021 JB |
296 | @echo "Producing \`oldXMenu/Makefile' from \`${srcdir}/oldXMenu/Makefile'." |
297 | @(echo "# This file is generated from \`${srcdir}/oldXMenu/Makefile'." ; \ | |
298 | echo "# If you are thinking about editing it, you should seriously consider" ; \ | |
299 | echo "# running \`make oldXMenu/Makefile' at the top of the" ; \ | |
300 | echo "# Emacs build tree instead, or editing" ; \ | |
301 | echo "# \`${srcdir}/oldXMenu/Makefile.in' itself." ; \ | |
302 | sed < ${srcdir}/oldXMenu/Makefile \ | |
303 | -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/oldXMenu|' \ | |
304 | -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/oldXMenu|' \ | |
305 | -e 's|^CC *=.*$$|CC='"${CC}"'|' \ | |
306 | -e 's|^DEFS *=.*$$|DEFS='"${DEFS}"'|' \ | |
307 | -e '/^# DIST: /d') > oldXMenu/Makefile.tmp | |
308 | @${srcdir}/move-if-change oldXMenu/Makefile.tmp oldXMenu/Makefile | |
309 | chmod -w oldXMenu/Makefile | |
78008d14 JB |
310 | |
311 | Makefile: | |
312 | ./config.status | |
313 | ||
314 | # ==================== Installation ==================== | |
315 | ||
dbc4e1c1 JB |
316 | ## If we let lib-src do its own installation, that means we |
317 | ## don't have to duplicate the list of utilities to install in | |
318 | ## this Makefile as well. | |
d3245f70 JB |
319 | |
320 | ## We delete each directory in ${COPYDESTS} before we copy into it; | |
321 | ## that way, we can reinstall over directories that have been put in | |
322 | ## place with their files read-only (perhaps because they are checked | |
323 | ## into RCS). In order to make this safe, we make sure that the | |
324 | ## source exists and is distinct from the destination. | |
78008d14 | 325 | install: all mkdir |
08edea3c | 326 | (cd lib-src; $(MAKE) install ${MFLAGS} bindir=${bindir} libdir=${libdir}) |
46947372 JB |
327 | -set ${COPYDESTS} ; \ |
328 | for dir in ${COPYDIR} ; do \ | |
329 | dest=$$1 ; shift ; \ | |
d3245f70 JB |
330 | [ -d $${dir} ] \ |
331 | && [ `(cd $${dir}; /bin/pwd)` != `(cd $${dest}; /bin/pwd)` ] \ | |
332 | && (echo "Copying $${dir}..." ; \ | |
333 | rm -rf $${dest} ; mkdir $${dest} ; \ | |
ddb73021 | 334 | (cd $${dir}; tar cf - . )|(cd $${dest}; umask 0; tar xvf - ); \ |
d3245f70 JB |
335 | for subdir in `find $${dest} -type d ! -name RCS -print` ; do \ |
336 | rm -rf $${subdir}/RCS ; \ | |
337 | rm -rf $${subdir}/CVS ; \ | |
338 | rm -f $${subdir}/\#* ; \ | |
339 | rm -f $${subdir}/*~ ; \ | |
340 | done) ; \ | |
46947372 | 341 | done |
ddb73021 JB |
342 | -(cd ${srcdir}/info ; \ |
343 | if [ ! -f ${infodir}/dir ] && [ -f dir ]; then \ | |
868e080d JB |
344 | ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 ./dir ${infodir}/dir ; \ |
345 | fi ; \ | |
346 | if [ "`echo *.info*`" != "*.info*" ]; then \ | |
347 | for f in *.info* ; do \ | |
348 | ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 $$f ${infodir}/$$f ; \ | |
349 | done ; \ | |
350 | fi) | |
ddb73021 JB |
351 | cd ${srcdir}/etc; for page in emacs etags ctags ; do \ |
352 | ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 $${page}.1 \ | |
78008d14 | 353 | ${mandir}/$${page}${manext} ; \ |
868e080d JB |
354 | done |
355 | ${INSTALL_PROGRAM} ${INSTALLFLAGS} -m 1755 src/emacs \ | |
78008d14 | 356 | ${bindir}/emacs-${version} |
46947372 | 357 | -rm -f ${bindir}/emacs |
78008d14 | 358 | ln ${bindir}/emacs-${version} ${bindir}/emacs |
86a5659e | 359 | |
dbc4e1c1 JB |
360 | ## If we let lib-src do its own installation, that means we |
361 | ## don't have to duplicate the list of utilities to install in | |
362 | ## this Makefile as well. | |
78008d14 | 363 | install.sysv: all mkdir |
08edea3c | 364 | (cd lib-src; $(MAKE) install ${MFLAGS} bindir=${bindir} libdir=${libdir}) |
46947372 JB |
365 | -set ${COPYDESTS} ; \ |
366 | for dir in ${COPYDIR} ; do \ | |
367 | dest=$$1 ; shift ; \ | |
d3245f70 JB |
368 | [ -d $${dir} ] \ |
369 | && [ `(cd $${dir}; /bin/pwd)` != `(cd $${dest}; /bin/pwd)` ] \ | |
370 | && (rm -rf $${dest} ; mkdir $${dest} ; \ | |
371 | (cd $${dir}; find . -print | cpio -pdum $${dest} ) ; \ | |
372 | for subdir in `find $${dest} -type d ! -name RCS -print` ; do \ | |
373 | rm -rf $${subdir}/RCS ; \ | |
374 | rm -rf $${subdir}/CVS ; \ | |
375 | rm -f $${subdir}/\#* ; \ | |
376 | rm -f $${subdir}/*~ ; \ | |
377 | done) ; \ | |
46947372 | 378 | done |
78008d14 | 379 | -(cd info ; \ |
868e080d JB |
380 | if [ ! -f ${infodir}/dir ]; then \ |
381 | cpset ./dir ${infodir} 444 bin bin ; \ | |
382 | fi ; \ | |
383 | if [ "`echo *.info*`" != "*.info*" ]; then \ | |
384 | for f in *.info* ; do \ | |
385 | cpset $$f ${infodir} 444 bin bin ; \ | |
386 | done ; \ | |
387 | fi) | |
78008d14 JB |
388 | -for page in emacs etags ctags ; do \ |
389 | cpset etc/$${page}.1 ${mandir}/$${page}${manext} 444 bin bin ; \ | |
868e080d | 390 | done |
46947372 | 391 | -/bin/rm -f ${bindir}/emacs |
868e080d | 392 | -cpset src/emacs ${bindir}/emacs-${version} 1755 bin bin |
78008d14 | 393 | -ln ${bindir}/emacs-${version} ${bindir}/emacs |
86a5659e | 394 | |
dbc4e1c1 JB |
395 | ## If we let lib-src do its own installation, that means we |
396 | ## don't have to duplicate the list of utilities to install in | |
397 | ## this Makefile as well. | |
78008d14 | 398 | install.xenix: all mkdir |
08edea3c | 399 | (cd lib-src; $(MAKE) install ${MFLAGS} bindir=${bindir} libdir=${libdir}) |
46947372 JB |
400 | -set ${COPYDESTS} ; \ |
401 | for dir in ${COPYDIR} ; do \ | |
402 | dest=$$1 ; shift ; \ | |
d3245f70 JB |
403 | [ -d $${dir} ] \ |
404 | && [ `(cd $${dir}; /bin/pwd)` != `(cd $${dest}; /bin/pwd)` ] \ | |
405 | && (rm -rf $${dest} ; mkdir $${dest} ; \ | |
406 | (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xpf - );\ | |
407 | for subdir in `find $${dest} -type d ! -name RCS -print` ; do \ | |
408 | rm -rf $${subdir}/RCS ; \ | |
409 | rm -rf $${subdir}/CVS ; \ | |
410 | rm -f $${subdir}/\#* ; \ | |
411 | rm -f $${subdir}/*~ ; \ | |
412 | done) ; \ | |
46947372 | 413 | done |
868e080d JB |
414 | -(cd info ; \ |
415 | if [ ! -f ${infodir}/dir ]; then \ | |
416 | cp ./dir ${infodir} ; \ | |
417 | chmod 444 ${infodir}/dir ; \ | |
418 | fi ; \ | |
419 | if [ "`echo *.info*`" != "*.info*" ]; then \ | |
420 | for f in *.info* ; do \ | |
421 | cp $$f ${infodir} ; \ | |
422 | chmod 444 ${infodir}/$$f ; \ | |
423 | done ; \ | |
424 | fi) | |
78008d14 JB |
425 | for page in emacs etags ctags ; do \ |
426 | cp etc/$${page}.1 ${mandir}/$${page}${manext} ; \ | |
427 | chmod 444 ${mandir}/$${page}${manext} ; \ | |
868e080d | 428 | done |
46947372 | 429 | -mv -f ${bindir}/emacs ${bindir}/emacs.old |
868e080d | 430 | cp src/emacs ${bindir}/emacs-${version} |
78008d14 | 431 | ln ${bindir}/emacs-${version} ${bindir}/emacs |
46947372 JB |
432 | chmod 1755 ${bindir}/emacs |
433 | -rm -f ${bindir}/emacs.old | |
86a5659e | 434 | |
dbc4e1c1 JB |
435 | ## If we let lib-src do its own installation, that means we |
436 | ## don't have to duplicate the list of utilities to install in | |
437 | ## this Makefile as well. | |
78008d14 | 438 | install.aix: all mkdir |
08edea3c | 439 | (cd lib-src; $(MAKE) install ${MFLAGS} bindir=${bindir} libdir=${libdir}) |
46947372 JB |
440 | -set ${COPYDESTS} ; \ |
441 | for dir in ${COPYDIR} ; do \ | |
442 | dest=$$1 ; shift ; \ | |
d3245f70 JB |
443 | [ -d $${dir} ] \ |
444 | && [ `(cd $${dir}; /bin/pwd)` != `(cd $${dest}; /bin/pwd)` ] \ | |
445 | && (rm -rf $${dest} ; mkdir $${dest} ; \ | |
446 | (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xBf - );\ | |
447 | for subdir in `find $${dest} -type d ! -name RCS -print` ; do \ | |
448 | rm -rf $${subdir}/RCS ; \ | |
449 | rm -rf $${subdir}/CVS ; \ | |
450 | rm -f $${subdir}/\#* ; \ | |
451 | rm -f $${subdir}/*~ ; \ | |
452 | done) ; \ | |
46947372 | 453 | done |
868e080d JB |
454 | -(cd info ; \ |
455 | if [ ! -f ${infodir}/dir ]; then \ | |
456 | ${INSTALL_DATA} ${INSTALLFLAGS} -M 444 -f ${infodir} ./dir ; \ | |
457 | fi ; \ | |
458 | if [ "`echo *.info*`" != "*.info*" ]; then \ | |
459 | for f in *.info* ; do \ | |
460 | ${INSTALL_DATA} ${INSTALLFLAGS} -M 444 -f ${infodir} $$f ; \ | |
461 | done ; \ | |
462 | fi) | |
463 | ${INSTALL_PROGRAM} ${INSTALLFLAGS} -M 1755 -f ${bindir} src/emacs | |
464 | mv ${bindir}/emacs ${bindir}/emacs-${version} | |
78008d14 JB |
465 | for page in emacs etags ctags ; do \ |
466 | ${INSTALL_DATA} ${INSTALLFLAGS} -M 444 -f ${mandir} etc/$${page}.1 ;\ | |
868e080d | 467 | done |
46947372 | 468 | -rm -f ${bindir}/emacs |
78008d14 | 469 | ln ${bindir}/emacs-${version} ${bindir}/emacs |
badb0a97 | 470 | |
868e080d | 471 | ### Build all the directories we're going to install Emacs in. Since |
78008d14 JB |
472 | ### we may be creating several layers of directories (for example, |
473 | ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use make-path | |
474 | ### instead of mkdir. Not all systems' mkdirs have the `-p' flag. | |
86a5659e | 475 | mkdir: FRC |
78008d14 JB |
476 | ./lib-src/make-path ${COPYDESTS} ${lockdir} |
477 | chmod 777 ${COPYDESTS} ${lockdir} | |
86a5659e JB |
478 | |
479 | FRC: | |
480 | ||
78008d14 JB |
481 | |
482 | # ==================== Cleaning up and miscellanea ==================== | |
483 | ||
484 | ### `clean' | |
868e080d JB |
485 | ### Delete all files from the current directory that are normally |
486 | ### created by building the program. Don't delete the files that | |
487 | ### record the configuration. Also preserve files that could be made | |
488 | ### by building, but normally aren't because the distribution comes | |
489 | ### with them. | |
78008d14 | 490 | ### `mostlyclean' |
868e080d JB |
491 | ### Like `clean', but may refrain from deleting a few files that |
492 | ### people normally don't want to recompile. For example, the | |
493 | ### `mostlyclean' target for GCC does not delete `libgcc.a', because | |
494 | ### recompiling it is rarely necessary and takes a lot of time. | |
78008d14 | 495 | ### |
46947372 | 496 | clean mostlyclean: |
08edea3c RS |
497 | cd src; $(MAKE) clean |
498 | cd lib-src; $(MAKE) clean | |
499 | cd oldXMenu; $(MAKE) clean | |
c75ff9db | 500 | if [ `(cd ${etcdir} ; /bin/pwd)` != `(cd etc; /bin/pwd)` ] ; then \ |
08edea3c | 501 | cd etc; $(MAKE) clean; \ |
46947372 JB |
502 | else true; \ |
503 | fi | |
46947372 | 504 | |
78008d14 | 505 | ### `distclean' |
868e080d JB |
506 | ### Delete all files from the current directory that are created by |
507 | ### configuring or building the program. This should leave only the | |
508 | ### files that would be in the distribution. | |
46947372 | 509 | distclean: |
08edea3c | 510 | for i in ${SUBDIR}; do (cd $$i; $(MAKE) ${MFLAGS} distclean); done |
46947372 JB |
511 | -(cd lock; rm *) |
512 | -rm config.status config-tmp-* | |
46947372 | 513 | |
78008d14 | 514 | ### `realclean' |
868e080d JB |
515 | ### Delete everything from the current directory that can be |
516 | ### reconstructed with this makefile. This typically includes | |
517 | ### everything deleted by distclean, plus more: C source files | |
518 | ### produced by Bison, tags tables, info files, and so on. | |
46947372 | 519 | realclean: |
08edea3c | 520 | for i in ${SUBDIR}; do (cd $$i; $(MAKE) ${MFLAGS} realclean); done |
46947372 JB |
521 | (cd lock; rm *) |
522 | rm config.status | |
523 | ||
78008d14 JB |
524 | ### This doesn't actually appear in the coding standards, but Karl |
525 | ### says GCC supports it, and that's where the configuration part of | |
526 | ### the coding standards seem to come from. It's like distclean, but | |
527 | ### it deletes backup and autosave files too. | |
528 | extraclean: | |
08edea3c | 529 | for i in ${SUBDIR}; do (cd $$i; $(MAKE) ${MFLAGS} extraclean); done |
78008d14 JB |
530 | -(cd lock; rm *) |
531 | -rm config.status config-tmp-* | |
532 | -rm -f *~ \#* | |
533 | ||
29c0047b ER |
534 | ### Unlocking and relocking. The idea of these productions is to reduce |
535 | ### hassles when installing an incremental tar of Emacs. Do `make unlock' | |
536 | ### before unlocking the file to take the write locks off all sources so | |
537 | ### that tar xvof will overwrite them without fuss. Then do `make relock' | |
538 | ### afterward so that VC mode will know which files should be checked in | |
539 | ### if you want to mung them. | |
540 | ### | |
541 | ### Note: it's no disaster if these productions miss a file or two; tar | |
542 | ### and VC will swiftly let you know if this happens, and it is easily | |
543 | ### corrected. | |
544 | SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \ | |
545 | README build-install.in configure make-dist move-if-change | |
546 | ||
547 | unlock: | |
548 | chmod u+w $(SOURCES) cpp/* | |
549 | -(cd elisp; chmod u+w Makefile README *.texi) | |
550 | (cd etc; make unlock) | |
551 | (cd lib-src; make unlock) | |
552 | (cd lisp; make unlock) | |
553 | (cd lisp/term; chmod u+w README *.el) | |
554 | (cd man; chmod u+w *texi* ChangeLog split-man) | |
555 | (cd oldXMenu; chmod u+w *.[ch] Makefile README) | |
556 | (cd src; make unlock) | |
557 | ||
558 | relock: | |
559 | chmod u-w $(SOURCES) cpp/* | |
560 | -(cd elisp; chmod u-w Makefile README *.texi) | |
561 | (cd etc; make relock) | |
562 | (cd lib-src; make relock) | |
563 | (cd lisp; make relock) | |
564 | (cd lisp/term; chmod u+w README *.el) | |
565 | (cd man; chmod u+w *texi* ChangeLog split-man) | |
566 | (cd oldXMenu; chmod u+w *.[ch] Makefile README) | |
567 | (cd src; make relock) | |
78008d14 | 568 | |
46947372 | 569 | TAGS tags: lib-src |
78008d14 JB |
570 | (cd ${srcdir} ; lib-src/etags --output=./src/TAGS \ |
571 | src/*.[ch] lisp/*.el lisp/term/*.el) | |
46947372 JB |
572 | |
573 | check: | |
574 | @echo "We don't have any tests for GNU Emacs yet." | |
4746118a JB |
575 | |
576 | dist: | |
78008d14 | 577 | cd ${srcdir}; make-dist |