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