3 |
# DIST: that first. |
# DIST: that first. |
4 |
|
|
5 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
6 |
# 2000, 2001, 2002 Free Software Foundation, Inc. |
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
7 |
|
|
8 |
# This file is part of GNU Emacs. |
# This file is part of GNU Emacs. |
9 |
|
|
34 |
# with them. |
# with them. |
35 |
# |
# |
36 |
# Delete `.dvi' files here if they are not part of the distribution. |
# Delete `.dvi' files here if they are not part of the distribution. |
37 |
# |
# |
38 |
# make distclean |
# make distclean |
39 |
# Delete all files from the current directory that are created by |
# Delete all files from the current directory that are created by |
40 |
# configuring or building the program. If you have unpacked the |
# configuring or building the program. If you have unpacked the |
41 |
# source and built the program without creating any other files, |
# source and built the program without creating any other files, |
42 |
# `make distclean' should leave only the files that were in the |
# `make distclean' should leave only the files that were in the |
43 |
# distribution. |
# distribution. |
44 |
# |
# |
45 |
# make maintainer-clean |
# make maintainer-clean |
46 |
# Delete everything from the current directory that can be |
# Delete everything from the current directory that can be |
47 |
# reconstructed with this Makefile. This typically includes |
# reconstructed with this Makefile. This typically includes |
69 |
C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ |
C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ |
70 |
LD_SWITCH_X_SITE=@LD_SWITCH_X_SITE@ |
LD_SWITCH_X_SITE=@LD_SWITCH_X_SITE@ |
71 |
YACC=@YACC@ |
YACC=@YACC@ |
72 |
|
EXEEXT=@EXEEXT@ |
73 |
|
|
74 |
### These help us choose version- and architecture-specific directories |
### These help us choose version- and architecture-specific directories |
75 |
### to install files in. |
### to install files in. |
122 |
# system, it is inappropriate to imply that it is part of Emacs. |
# system, it is inappropriate to imply that it is part of Emacs. |
123 |
infodir=@infodir@ |
infodir=@infodir@ |
124 |
|
|
125 |
|
# Directory for local state files for all programs. |
126 |
|
localstatedir=@localstatedir@ |
127 |
|
|
128 |
# Where to look for bitmap files. |
# Where to look for bitmap files. |
129 |
bitmapdir=@bitmapdir@ |
bitmapdir=@bitmapdir@ |
130 |
|
|
142 |
# Where to find the application default. |
# Where to find the application default. |
143 |
x_default_search_path=@x_default_search_path@ |
x_default_search_path=@x_default_search_path@ |
144 |
|
|
145 |
|
# Location to install Emacs.app on Mac OS X |
146 |
|
carbon_appdir=@carbon_appdir@ |
147 |
|
|
148 |
# ==================== Emacs-specific directories ==================== |
# ==================== Emacs-specific directories ==================== |
149 |
|
|
150 |
# These variables hold the values Emacs will actually use. They are |
# These variables hold the values Emacs will actually use. They are |
172 |
# building. This is only used during the process of |
# building. This is only used during the process of |
173 |
# compiling Emacs, to help Emacs find its lisp files |
# compiling Emacs, to help Emacs find its lisp files |
174 |
# before they've been installed in their final location. |
# before they've been installed in their final location. |
175 |
# It's usually identical to lisppath, except that |
# It's usually identical to lisppath, except that |
176 |
# it does not include locallisppath, and the |
# it does not include locallisppath, and the |
177 |
# entry for the directory containing the installed lisp |
# entry for the directory containing the installed lisp |
178 |
# files has been replaced with ../lisp. This should be a |
# files has been replaced with ../lisp. This should be a |
197 |
# Where to put the docstring file. |
# Where to put the docstring file. |
198 |
docdir=@docdir@ |
docdir=@docdir@ |
199 |
|
|
200 |
|
# Where to install Emacs game score files. |
201 |
|
gamedir=@gamedir@ |
202 |
|
|
203 |
# ==================== Utility Programs for the Build ==================== |
# ==================== Utility Programs for the Build ==================== |
204 |
|
|
205 |
# Allow the user to specify the install program. |
# Allow the user to specify the install program. |
206 |
INSTALL = @INSTALL@ |
INSTALL = @INSTALL@ |
207 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
208 |
INSTALL_DATA = @INSTALL_DATA@ |
INSTALL_DATA = @INSTALL_DATA@ |
209 |
INSTALL_INFO = install-info |
INSTALL_INFO = @INSTALL_INFO@ |
210 |
# By default, we uphold the dignity of our programs. |
# By default, we uphold the dignity of our programs. |
211 |
INSTALL_STRIP = |
INSTALL_STRIP = |
212 |
|
|
216 |
TRANSFORM = @program_transform_name@ |
TRANSFORM = @program_transform_name@ |
217 |
|
|
218 |
# What emacs should be called when installed. |
# What emacs should be called when installed. |
219 |
EMACS = `echo emacs | sed '$(TRANSFORM)'` |
EMACS = `echo emacs${EXEEXT} | sed '$(TRANSFORM)'` |
220 |
EMACSFULL = `echo emacs-${version} | sed '$(TRANSFORM)'` |
EMACSFULL = `echo emacs-${version}${EXEEXT} | sed '$(TRANSFORM)'` |
221 |
|
|
222 |
# Subdirectories to make recursively. `lisp' is not included |
# Subdirectories to make recursively. `lisp' is not included |
223 |
# because the compiled lisp files are part of the distribution. |
# because the compiled lisp files are part of the distribution. |
237 |
COPYDESTS = ${etcdir} ${lispdir} |
COPYDESTS = ${etcdir} ${lispdir} |
238 |
|
|
239 |
# Set to FRC to force running autoconf and autoheader |
# Set to FRC to force running autoconf and autoheader |
240 |
MAINT = |
MAINT = |
241 |
|
|
242 |
all: ${SUBDIR} leim |
all: ${SUBDIR} leim |
243 |
|
|
248 |
@(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \ |
@(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \ |
249 |
buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \ |
buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \ |
250 |
x_default_search_path=`echo ${x_default_search_path}`; \ |
x_default_search_path=`echo ${x_default_search_path}`; \ |
251 |
|
gamedir=`echo ${gamedir}`; \ |
252 |
sed < ${srcdir}/src/epaths.in > epaths.h.$$$$ \ |
sed < ${srcdir}/src/epaths.in > epaths.h.$$$$ \ |
253 |
-e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \ |
-e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \ |
254 |
-e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \ |
-e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \ |
257 |
-e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \ |
-e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \ |
258 |
-e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \ |
-e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \ |
259 |
-e 's;\(#.*PATH_X_DEFAULTS\).*$$;\1 "${x_default_search_path}";' \ |
-e 's;\(#.*PATH_X_DEFAULTS\).*$$;\1 "${x_default_search_path}";' \ |
260 |
|
-e 's;\(#.*PATH_GAME\).*$$;\1 "${gamedir}";' \ |
261 |
-e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";') && \ |
-e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";') && \ |
262 |
${srcdir}/move-if-change epaths.h.$$$$ src/epaths.h |
${srcdir}/move-if-change epaths.h.$$$$ src/epaths.h |
263 |
|
|
359 |
exec_prefix=${exec_prefix} bindir=${bindir} \ |
exec_prefix=${exec_prefix} bindir=${bindir} \ |
360 |
libexecdir=${libexecdir} archlibdir=${archlibdir} \ |
libexecdir=${libexecdir} archlibdir=${archlibdir} \ |
361 |
INSTALL_STRIP=${INSTALL_STRIP}) |
INSTALL_STRIP=${INSTALL_STRIP}) |
362 |
${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs ${bindir}/$(EMACSFULL) |
${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} ${bindir}/$(EMACSFULL) |
363 |
-chmod 1755 ${bindir}/$(EMACSFULL) |
-chmod 1755 ${bindir}/$(EMACSFULL) |
364 |
rm -f ${bindir}/$(EMACS) |
rm -f ${bindir}/$(EMACS) |
365 |
-ln ${bindir}/$(EMACSFULL) ${bindir}/$(EMACS) |
-ln ${bindir}/$(EMACSFULL) ${bindir}/$(EMACS) |
369 |
${INSTALL_DATA} lib-src/$$f ${archlibdir}/$$f; \ |
${INSTALL_DATA} lib-src/$$f ${archlibdir}/$$f; \ |
370 |
else true; fi ; \ |
else true; fi ; \ |
371 |
done |
done |
372 |
|
if test "${carbon_appdir}" != ""; then \ |
373 |
|
umask 022; mkdir -p ${carbon_appdir}/Emacs.app; \ |
374 |
|
(cd mac/Emacs.app; tar -chf - . ) | \ |
375 |
|
(cd ${carbon_appdir}/Emacs.app; umask 022; tar -xvf - \ |
376 |
|
&& cat > /dev/null) || exit 1; \ |
377 |
|
fi |
378 |
|
|
379 |
### Install the files that are machine-independent. |
### Install the files that are machine-independent. |
380 |
### Most of them come straight from the distribution; |
### Most of them come straight from the distribution; |
407 |
(cd $${dir}; tar -chf - . ) \ |
(cd $${dir}; tar -chf - . ) \ |
408 |
| (cd $${dest}; umask 022; \ |
| (cd $${dest}; umask 022; \ |
409 |
tar -xvf - && cat > /dev/null) || exit 1; \ |
tar -xvf - && cat > /dev/null) || exit 1; \ |
410 |
find $${dest} -exec chown $$LOGNAME {} ';' ;\ |
find $${dest} -exec chown $${LOGNAME:-$$USERNAME} {} ';' ;\ |
411 |
for subdir in `find $${dest} -type d ! -name RCS ! -name CVS -print` ; do \ |
for subdir in `find $${dest} -type d ! -name RCS ! -name CVS -print` ; do \ |
412 |
chmod a+rx $${subdir} ; \ |
chmod a+rx $${subdir} ; \ |
413 |
rm -rf $${subdir}/RCS ; \ |
rm -rf $${subdir}/RCS ; \ |
446 |
echo "Copying etc/DOC-* to ${docdir} ..." ; \ |
echo "Copying etc/DOC-* to ${docdir} ..." ; \ |
447 |
(cd ./etc; tar -chf - DOC*) \ |
(cd ./etc; tar -chf - DOC*) \ |
448 |
|(cd ${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ |
|(cd ${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ |
449 |
(cd $(docdir); chown $${LOGNAME} DOC*; chmod a+r DOC*; rm DOC); \ |
(cd $(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \ |
450 |
|
if test "`echo DOC-*`" != "DOC-*"; then rm DOC; fi); \ |
451 |
else true; fi |
else true; fi |
452 |
-unset CDPATH; \ |
-unset CDPATH; \ |
453 |
if [ -r ./lisp ] \ |
if [ -r ./lisp ] \ |
458 |
echo "Copying lisp/*.el and lisp/*.elc to ${lispdir} ..." ; \ |
echo "Copying lisp/*.el and lisp/*.elc to ${lispdir} ..." ; \ |
459 |
(cd lisp; tar -chf - *.el *.elc) \ |
(cd lisp; tar -chf - *.el *.elc) \ |
460 |
|(cd ${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ |
|(cd ${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ |
461 |
(cd ${lispdir}; find . -exec chown $${LOGNAME} {} ';') ; \ |
(cd ${lispdir}; find . -exec chown $${LOGNAME:-$$USERNAME} {} ';') ; \ |
462 |
else true; fi |
else true; fi |
463 |
-unset CDPATH; \ |
-unset CDPATH; \ |
464 |
thisdir=`/bin/pwd`; \ |
thisdir=`/bin/pwd`; \ |
472 |
chmod a+r ${infodir}/dir); \ |
chmod a+r ${infodir}/dir); \ |
473 |
fi; \ |
fi; \ |
474 |
cd ${srcdir}/info ; \ |
cd ${srcdir}/info ; \ |
475 |
for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* eshell* eudc* forms* gnus* idlwave* info* message* mh-e* pcl-cvs* reftex* sc* speedbar* vip* widget* woman*; do \ |
for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* eshell* eudc* forms* gnus* idlwave* info* message* mh-e* pcl-cvs* reftex* sc* speedbar* tramp* vip* widget* woman* smtpmail*; do \ |
476 |
(cd $${thisdir}; \ |
(cd $${thisdir}; \ |
477 |
${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \ |
${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \ |
478 |
chmod a+r ${infodir}/$$f); \ |
chmod a+r ${infodir}/$$f); \ |
482 |
thisdir=`/bin/pwd`; \ |
thisdir=`/bin/pwd`; \ |
483 |
if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \ |
if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \ |
484 |
then \ |
then \ |
485 |
for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime eshell eudc forms gnus idlwave info message mh-e pcl-cvs reftex sc speedbar vip viper widget woman; do \ |
for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime eshell eudc forms gnus idlwave info message mh-e pcl-cvs reftex sc speedbar tramp vip viper widget woman smtpmail; do \ |
486 |
(cd $${thisdir}; \ |
(cd $${thisdir}; \ |
487 |
${INSTALL_INFO} --info-dir=${infodir} ${infodir}/$$f); \ |
${INSTALL_INFO} --info-dir=${infodir} ${infodir}/$$f); \ |
488 |
done; \ |
done; \ |
548 |
done |
done |
549 |
(cd ${archlibdir} && rm -f fns-*) |
(cd ${archlibdir} && rm -f fns-*) |
550 |
-rm -rf ${libexecdir}/emacs/${version} |
-rm -rf ${libexecdir}/emacs/${version} |
551 |
(cd ${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* widget* woman* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* vip*) |
(cd ${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* vip* smtpmail*) |
552 |
(cd ${man1dir} && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext}) |
(cd ${man1dir} && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext}) |
553 |
(cd ${bindir} && rm -f $(EMACSFULL) $(EMACS)) |
(cd ${bindir} && rm -f $(EMACSFULL) $(EMACS)) |
554 |
|
|
580 |
### record the configuration. Also preserve files that could be made |
### record the configuration. Also preserve files that could be made |
581 |
### by building, but normally aren't because the distribution comes |
### by building, but normally aren't because the distribution comes |
582 |
### with them. |
### with them. |
583 |
### |
### |
584 |
### Delete `.dvi' files here if they are not part of the distribution. |
### Delete `.dvi' files here if they are not part of the distribution. |
585 |
clean: FRC |
clean: FRC |
586 |
(cd src; $(MAKE) $(MFLAGS) clean) |
(cd src; $(MAKE) $(MFLAGS) clean) |
619 |
### reconstructed with this Makefile. This typically includes |
### reconstructed with this Makefile. This typically includes |
620 |
### everything deleted by distclean, plus more: C source files |
### everything deleted by distclean, plus more: C source files |
621 |
### produced by Bison, tags tables, info files, and so on. |
### produced by Bison, tags tables, info files, and so on. |
622 |
### |
### |
623 |
### One exception, however: `make maintainer-clean' should not delete |
### One exception, however: `make maintainer-clean' should not delete |
624 |
### `configure' even if `configure' can be remade using a rule in the |
### `configure' even if `configure' can be remade using a rule in the |
625 |
### Makefile. More generally, `make maintainer-clean' should not delete |
### Makefile. More generally, `make maintainer-clean' should not delete |
721 |
### special emacs executable is built from Lisp sources, which is then |
### special emacs executable is built from Lisp sources, which is then |
722 |
### used to compile Lisp files. The last step is a "normal" make. |
### used to compile Lisp files. The last step is a "normal" make. |
723 |
|
|
724 |
.PHONY: bootstrap bootstrap-lisp-1 boostrap-src bootstrap-lisp bootstrap-clean |
.PHONY: bootstrap |
725 |
.PHONY: maybe_bootstrap |
.PHONY: maybe_bootstrap |
726 |
|
|
727 |
maybe_bootstrap: |
maybe_bootstrap: |
728 |
@if [ ! -f $(srcdir)/lisp/abbrev.elc ]; then \ |
@bar="`echo $(srcdir)/lisp/*.elc`"; \ |
729 |
echo "Essential Lisp files seem to be missing. You should either"; \ |
if [ \( "$$bar" = '$(srcdir)/lisp/*.elc' \) -o \( "$$bar" = '' \) ]; then \ |
730 |
echo "do \`make bootstrap' or create \`lisp/abbrev.elc' somehow."; \ |
echo "Your tree does not include the compiled Lisp files."; \ |
731 |
|
echo "You need to do \`make bootstrap' to build Emacs."; \ |
732 |
|
echo "Emacs now requires Texinfo version 4.2."; \ |
733 |
exit 1;\ |
exit 1;\ |
734 |
fi |
fi |
735 |
|
|
736 |
bootstrap: bootstrap-clean-before bootstrap-lisp-1 bootstrap-src bootstrap-lisp bootstrap-clean-after all info |
bootstrap: bootstrap-clean-before info FRC |
|
|
|
|
bootstrap-lisp-1: |
|
737 |
(cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) |
(cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) |
|
|
|
|
bootstrap-lisp: |
|
|
(cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=../src/bootstrap-emacs) |
|
|
|
|
|
bootstrap-src: |
|
738 |
(cd src; $(MAKE) $(MFLAGS) bootstrap) |
(cd src; $(MAKE) $(MFLAGS) bootstrap) |
739 |
|
(cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=../src/bootstrap-emacs${EXEEXT}) |
740 |
|
(cd src; $(MAKE) $(MFLAGS) mostlyclean) |
741 |
|
$(MAKE) $(MFLAGS) all |
742 |
|
(cd lisp; $(MAKE) $(MFLAGS) bootstrap-after) |
743 |
|
|
744 |
### Used for `bootstrap' to avoid deleting existing dumped Emacs executables. |
### Used for `bootstrap' to avoid deleting existing dumped Emacs executables. |
745 |
bootstrap-clean-before: FRC |
bootstrap-clean-before: FRC |
752 |
-(cd lispintro && $(MAKE) $(MFLAGS) clean) |
-(cd lispintro && $(MAKE) $(MFLAGS) clean) |
753 |
(cd leim; $(MAKE) $(MFLAGS) clean) |
(cd leim; $(MAKE) $(MFLAGS) clean) |
754 |
|
|
|
bootstrap-clean-after: |
|
|
(cd src; $(MAKE) $(MFLAGS) mostlyclean) |
|