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!
16 # This is a little less dangerous.
20 # ==================== Where To Install Things ====================
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.
29 # Where to install Emacs and other binaries that people will want to
30 # run directly (like etags).
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
38 # Where to install and expect the architecture-independent data files
39 # (like the tutorial and the Zippy database).
40 datadir=$(emacsdir
)/etc
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
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
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
57 lisppath
=$(locallisppath
):$(lispdir
)
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
66 dumplisppath
=$(locallisppath
):..
/lisp
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.
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
77 # Where to install and expect executable files to be run by Emacs
78 # rather than directly by users, and other architecture-dependent
80 libdir=$(emacsdir
)/arch-lib
82 # Where to install Emacs's man pages.
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
92 # ==================== Utility Programs for the Build ====================
94 # Allow the user to specify the install program.
97 INSTALL_PROGRAM
= ${INSTALL}
98 INSTALL_DATA
= ${INSTALL}
101 # ============================= Targets ==============================
103 # Flags passed down to subdirectory makefiles.
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.
111 # Subdirectories to install, and where they'll go.
112 COPYDIR
= arch-lib etc
info lisp
113 COPYDESTS
= $(libdir) $(datadir) $(infodir) $(lispdir
)
115 all: src
/paths.h
${SUBDIR}
117 removenullpaths
=sed
-e
's/^://' -e
's/:$$//' -e
's/::/:/'
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!!!";'
132 .RECURSIVE
: ${SUBDIR}
135 cd
$@
; make
${MFLAGS} all
137 install: all mkdir lockdir
138 -set
${COPYDESTS} ; \
139 for
dir in
${COPYDIR} ; do \
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}/*~
; \
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
158 install.sysv
: all mkdir lockdir
159 -set
${COPYDESTS} ; \
160 for
dir in
${COPYDIR} ; do \
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}/*~
; \
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
178 install.xenix
: all mkdir lockdir
179 -set
${COPYDESTS} ; \
180 for
dir in
${COPYDIR} ; do \
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}/*~
; \
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
200 install.aix
: all mkdir lockdir
201 -set
${COPYDESTS} ; \
202 for
dir in
${COPYDIR} ; do \
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}/*~
; \
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
221 # Build all the directories
223 # If any of the directories are below ${emacsdir}, create it.
224 -for
dir in
${COPYDESTS}; do \
227 if
[ ! -d
${emacsdir} ]; then \
228 -mkdir
${emacsdir} ; \
229 -chmod
777 ${emacsdir} ; \
236 -chmod
777 ${COPYDESTS}
239 # If the lockdir needs ${emacsdir}, create it.
240 -case
"${lockdir}" in \
242 if
[ ! -d
${emacsdir} ]; then \
243 -mkdir
${emacsdir} ; \
244 -chmod
777 ${emacsdir} ; \
249 -chmod
777 ${LOCKDIR}
255 if
[ `/bin/pwd` != `(cd ${DESTDIR}${LIBDIR}; /bin/pwd)` ] ; then \
256 cd etc
; make
clean; \
259 cd oldXMenu
; make
clean
262 for i in
${SUBDIR}; do
(cd
$$i; make
${MFLAGS} distclean); done
264 -rm config.status config-tmp-
*
268 for i in
${SUBDIR}; do
(cd
$$i; make
${MFLAGS} realclean); done
273 cd src
; ..
/arch-lib
/etags
*.
[ch
] ..
/lisp
/*.el ..
/lisp
/term
/*.el
276 @echo
"We don't have any tests for GNU Emacs yet."