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
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.
13 # make distclean to delete everything that wasn't in the distribution.
14 # This is a very dangerous thing to do! It removes backup files,
17 # This is a little less dangerous.
19 # This produces a tar file from the current source tree suitable
24 # ==================== Where To Install Things ====================
26 # The default location for installation. Everything is placed in
27 # subdirectories of this directory. This directory must exist when
28 # you start installation. The default values for many of the
29 # variables below are expressed in terms of this one, so you may not
30 # need to change them.
33 # Where to install Emacs and other binaries that people will want to
34 # run directly (like etags).
37 # A directory under which we will install many of Emacs's files. The
38 # default values for many of the variables below are expressed in
39 # terms of this one, so you may not need to change them.
40 emacsdir
=${prefix}/emacs-19.0
42 # Where to install and expect the architecture-independent data files
43 # (like the tutorial and the Zippy database).
44 datadir=${emacsdir}/etc
46 # Where to install the elisp files distributed with Emacs. Strictly
47 # speaking, all the elisp files should go under datadir (above), since
48 # both elisp source and compiled elisp are completely portable, but
49 # it's traditional to give the lisp files their own subdirectory.
50 lispdir
=${emacsdir}/lisp
52 # Directories Emacs should search for elisp files specific to this
53 # site (i.e. customizations), before consulting ${lispdir}. This
54 # should be a colon-separated list of directories.
55 locallisppath
=${emacsdir}/local-lisp
57 # Where Emacs will search to find its elisp files. Before changing
58 # this, check to see if your purpose wouldn't better be served by
59 # changing locallisppath. This should be a colon-separated list of
61 lisppath
=${locallisppath}:${lispdir}
63 # Where Emacs will search for its elisp files while building. This is
64 # only used during the process of compiling Emacs, to help Emacs find
65 # its lisp files before they've been installed in their final
66 # location. It's usually identical to lisppath, except that the entry
67 # for the directory containing the installed lisp files has been
68 # replaced with ../lisp. This should be a colon-separated list of
72 # Where to install and expect the files that Emacs modifies as it
73 # runs. These files are all architecture-independent. Right now,
74 # the only such data is the locking directory.
77 # Where to create and expect the locking directory, where the Emacs
78 # locking code keeps track of which files are currently being edited.
79 lockdir
=${statedir}/lock
81 # Where to install and expect executable files to be run by Emacs
82 # rather than directly by users, and other architecture-dependent
84 libdir=${emacsdir}/arch-lib
86 # Where to install Emacs's man pages.
89 # Where to install and expect the info files describing Emacs. In the
90 # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
91 # since there are now many packages documented with the texinfo
92 # system, it is inappropriate to imply that it is part of Emacs.
93 infodir=${prefix}/info
96 # ==================== Utility Programs for the Build ====================
98 # Allow the user to specify the install program.
101 INSTALL_PROGRAM
= ${INSTALL}
102 INSTALL_DATA
= ${INSTALL}
105 # ============================= Targets ==============================
107 # Flags passed down to subdirectory makefiles.
110 # Subdirectories to make recursively. `lisp' is not included
111 # because the compiled lisp files are part of the distribution
112 # and you cannot remake them without installing Emacs first.
115 # Subdirectories to install, and where they'll go.
116 COPYDIR
= arch-lib etc
info lisp
117 COPYDESTS
= ${libdir} ${datadir} ${infodir} ${lispdir}
119 all: src
/paths.h
${SUBDIR}
121 removenullpaths
=sed
-e
's/^://' -e
's/:$$//' -e
's/::/:/'
123 # Note that sed is not in /bin on 386bsd.
124 src
/paths.h
: Makefile src
/paths.h.in
125 lisppath
=`echo ${lisppath} | ${removenullpaths}` ; \
126 buildlisppath
=`echo ${buildlisppath} | ${removenullpaths}` ; \
127 sed
< src
/paths.h.in
> src
/paths.h.tmp \
128 -e
's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
129 -e
's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
130 -e
's;\(#.*PATH_EXEC\).*$$;\1 "${libdir}";' \
131 -e
's;\(#.*PATH_DATA\).*$$;\1 "${datadir}";' \
132 -e
's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";'
133 .
/move-if-change src
/paths.h.tmp src
/paths.h
137 .RECURSIVE
: ${SUBDIR}
140 cd
$@
; make
${MFLAGS} all
142 install: all mkdir lockdir
143 -set
${COPYDESTS} ; \
144 for
dir in
${COPYDIR} ; do \
146 if
[ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
147 (cd
$${dir}; tar cf
- .
) |
(cd
$${dest}; umask
0; tar xf
- ) ; \
148 for subdir in
`find $${dest} -type d ! -name RCS -print` ; do \
149 rm -rf
$${subdir}/RCS
; \
150 rm -f
$${subdir}/\
#* ; \
151 rm -f
$${subdir}/*~
; \
155 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c arch-lib
/emacsclient
${bindir}/emacsclient
156 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c arch-lib
/etags
${bindir}/etags
157 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c arch-lib
/ctags
${bindir}/ctags
158 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c
-m
1755 src
/xemacs
${bindir}/xemacs
159 ${INSTALL_DATA} ${INSTALLFLAGS} -c
-m
444 etc
/emacs
.1 ${mandir}/emacs
.1
160 -rm -f
${bindir}/emacs
161 mv
${bindir}/xemacs
${bindir}/emacs
163 install.sysv
: all mkdir lockdir
164 -set
${COPYDESTS} ; \
165 for
dir in
${COPYDIR} ; do \
167 if
[ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
168 (cd
$${dir}; find .
-print | cpio
-pdum
${dest} ) ; \
169 for subdir in
`find $${dest} -type d ! -name RCS -print` ; do \
170 rm -rf
$${subdir}/RCS
; \
171 rm -f
$${subdir}/\
#* ; \
172 rm -f
$${subdir}/*~
; \
176 -cpset arch-lib
/emacsclient
${bindir}/emacsclient
755 bin bin
177 -cpset arch-lib
/etags
${bindir}/etags
755 bin bin
178 -cpset arch-lib
/ctags
${bindir}/ctags
755 bin bin
179 -cpset etc
/emacs
.1 ${mandir}/emacs
.1 444 bin bin
180 -/bin
/rm -f
${bindir}/emacs
181 -cpset src
/xemacs
${bindir}/emacs
1755 bin bin
183 install.xenix
: all mkdir lockdir
184 -set
${COPYDESTS} ; \
185 for
dir in
${COPYDIR} ; do \
187 if
[ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
188 (cd
$${dir}; tar cf
- .
) |
(cd
$${dest}; umask
0; tar xpf
- ) ; \
189 for subdir in
`find $${dest} -type d ! -name RCS -print` ; do \
190 rm -rf
$${subdir}/RCS
; \
191 rm -f
$${subdir}/\
#* ; \
192 rm -f
$${subdir}/*~
; \
196 cp arch-lib
/etags arch-lib
/ctags arch-lib
/emacsclient
${bindir}
197 chmod
755 ${bindir}/etags
${bindir}/ctags
${bindir}/emacsclient
198 cp etc
/emacs
.1 ${mandir}/emacs
.1
199 chmod
444 ${mandir}/emacs
.1
200 -mv
-f
${bindir}/emacs
${bindir}/emacs.old
201 cp src
/xemacs
${bindir}/emacs
202 chmod
1755 ${bindir}/emacs
203 -rm -f
${bindir}/emacs.old
205 install.aix
: all mkdir lockdir
206 -set
${COPYDESTS} ; \
207 for
dir in
${COPYDIR} ; do \
209 if
[ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
210 (cd
$${dir}; tar cf
- .
) |
(cd
$${dest}; umask
0; tar xBf
- ) ; \
211 for subdir in
`find $${dest} -type d ! -name RCS -print` ; do \
212 rm -rf
$${subdir}/RCS
; \
213 rm -f
$${subdir}/\
#* ; \
214 rm -f
$${subdir}/*~
; \
218 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -f
${bindir} etc
/emacsclient
219 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -f
${bindir} etc
/etags
220 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -f
${bindir} etc
/ctags
221 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -M
1755 -f
${bindir} src
/xemacs
222 ${INSTALL_DATA} ${INSTALLFLAGS} -M
444 -f
${mandir} etc
/emacs
.1
223 -rm -f
${bindir}/emacs
224 mv
${bindir}/xemacs
${bindir}/emacs
226 # Build all the directories
228 # If any of the directories are below ${emacsdir}, create it.
229 -for
dir in
${COPYDESTS}; do \
232 if
[ ! -d
${emacsdir} ]; then \
233 mkdir
${emacsdir} ; \
234 chmod
777 ${emacsdir} ; \
241 -chmod
777 ${COPYDESTS}
244 # If the lockdir needs ${emacsdir}, create it.
245 -case
"${lockdir}" in \
247 if
[ ! -d
${emacsdir} ]; then \
248 mkdir
${emacsdir} ; \
249 chmod
777 ${emacsdir} ; \
254 -chmod
777 ${LOCKDIR}
260 if
[ `/bin/pwd` != `(cd ${emacsdir}; /bin/pwd)` ] ; then \
261 (cd etc
; make
clean); \
262 (cd lib-src
; make
clean); \
265 cd oldXMenu
; make
clean
268 for i in
${SUBDIR}; do
(cd
$$i; make
${MFLAGS} distclean); done
270 -rm config.status config-tmp-
*
274 for i in
${SUBDIR}; do
(cd
$$i; make
${MFLAGS} realclean); done
279 cd src
; ..
/arch-lib
/etags
*.
[ch
] ..
/lisp
/*.el ..
/lisp
/term
/*.el
282 @echo
"We don't have any tests for GNU Emacs yet."