*** empty log message ***
[emacs.git] / Makefile.in
blob20e4300dc52e7060418ba5ebbb1f621fe7a527b2
1 # This is the distribution Makefile for Emacs. config.emacs can make
2 # most of the changes to this file you might want, so try that first.
4 # make all to compile and build Emacs
5 # make install to install it
6 # make install.sysv to install on system V.
7 # make install.xenix to install on Xenix
8 # make tags to update tags tables
10 # make distclean to delete everything that wasn't in the distribution
11 # This is a very dangerous thing to do!
12 # make clean
13 # This is a little less dangerous.
15 SHELL = /bin/sh
17 # ==================== Where to install things ====================
18 # Note that on system V you must change MANDIR to /usr/local/man/man1.
20 # Where to install all of Emacs's data files - the lisp code,
21 # documentation tree, and the architecture-dependent and -independent
22 # libraries. If this is not the directory we're building under
23 # already, the `install' targets will move or copy it there. The
24 # default definitions for the variables below are expressed in terms
25 # of this one, so you may not need to change them.
26 LIBROOT=/usr/local/emacs
28 # This is where the `install' make target should place the binaries
29 # people will want to run directly (like etags and Emacs itself).
30 INSTALLBIN=/usr/local/bin
32 # Emacs will search this path to find its elisp files. This should be
33 # a colon-separated list of directories. Strictly speaking, all the
34 # elisp files should go under DATADIR (below), since both elisp source
35 # and compiled elisp are completely portable, but it's traditional to
36 # give the lisp files their own subdirectory.
37 LISPPATH=/usr/local/emacs/local-lisp:/usr/local/emacs/lisp
39 # Emacs will look here for its architecture-independent files (like
40 # the tutorial and the zippy database).
41 DATADIR=/usr/local/emacs/share-lib
43 # Emacs will look here for its architecture-dependent files, like
44 # executables for its utilities.
45 LIBDIR=/usr/local/emacs/arch-lib
47 # The locking directory, where the Emacs locking code keeps track of
48 # which files are currently being edited.
49 LOCKDIR=/usr/local/emacs/lock
51 # This is where the `install' make target should place the man pages
52 # for the binaries it installs.
53 MANDIR= /usr/man/man1
57 # Flags passed down to subdirectory makefiles.
58 MFLAGS=
60 # Subdirectories to make recursively. `lisp' is not included
61 # because the compiled lisp files are part of the distribution
62 # and you cannot remake them without installing Emacs first.
63 SUBDIR= lib-src src
65 # Subdirectories to install
66 COPYDIR= arch-lib share-lib info lisp
68 # Subdirectories to clean
69 CLEANDIR= ${COPYDIR} lisp/term
71 all: src/paths.h ${SUBDIR}
73 src/paths.h: Makefile src/paths.h-dist
74 /bin/sed < src/paths.h-dist > src/paths.h \
75 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "$(LISPPATH)";' \
76 -e 's;\(#.*PATH_EXEC\).*$$;\1 "$(LIBDIR)";' \
77 -e 's;\(#.*PATH_DATA\).*$$;\1 "$(DATADIR)";' \
78 -e 's;\(#.*LOCK\).*$$;\1 "$(LOCKDIR)/";'
80 src: lib-src
82 .RECURSIVE: ${SUBDIR}
84 ${SUBDIR}: FRC
85 cd $@; make ${MFLAGS} all
87 install: all mkdir lockdir
88 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
89 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xf - ) ;\
90 for i in ${CLEANDIR}; do \
91 (rm -rf ${LIBROOT}/$$i/RCS; \
92 rm -f ${LIBROOT}/$$i/\#*; \
93 rm -f ${LIBROOT}/$$i/*~); \
94 done \
95 else true; \
97 install -c -s arch-lib/emacsclient ${INSTALLBIN}/emacsclient
98 install -c -s arch-lib/etags ${INSTALLBIN}/etags
99 install -c -s arch-lib/ctags ${INSTALLBIN}/ctags
100 install -c -s -m 1755 src/xemacs ${INSTALLBIN}/xemacs
101 install -c -m 444 share-lib/emacs.1 ${MANDIR}/emacs.1
102 -rm -f ${INSTALLBIN}/emacs
103 mv ${INSTALLBIN}/xemacs ${INSTALLBIN}/emacs
105 install.sysv: all mkdir lockdir
106 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
107 find ${COPYDIR} -print | cpio -pdum ${LIBROOT} ;\
108 for i in ${CLEANDIR}; do \
109 (rm -rf ${LIBROOT}/$$i/RCS; \
110 rm -f ${LIBROOT}/$$i/\#*; \
111 rm -f ${LIBROOT}/$$i/*~); \
112 done \
113 else true; \
115 -cpset arch-lib/emacsclient ${INSTALLBIN}/emacsclient 755 bin bin
116 -cpset arch-lib/etags ${INSTALLBIN}/etags 755 bin bin
117 -cpset arch-lib/ctags ${INSTALLBIN}/ctags 755 bin bin
118 -cpset share-lib/emacs.1 ${MANDIR}/emacs.1 444 bin bin
119 -/bin/rm -f ${INSTALLBIN}/emacs
120 -cpset src/xemacs ${INSTALLBIN}/emacs 1755 bin bin
122 install.xenix: all mkdir lockdir
123 if [ `pwd` != `(cd ${LIBROOT}; pwd)` ] ; then \
124 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xpf - ) ;\
125 for i in ${CLEANDIR}; do \
126 (rm -rf ${LIBROOT}/$$i/RCS; \
127 rm -f ${LIBROOT}/$$i/\#*; \
128 rm -f ${LIBROOT}/$$i/*~); \
129 done \
130 else true; \
132 cp arch-lib/etags arch-lib/ctags arch-lib/emacsclient ${INSTALLBIN}
133 chmod 755 ${INSTALLBIN}/etags ${INSTALLBIN}/ctags ${INSTALLBIN}/emacsclient
134 cp share-lib/emacs.1 ${MANDIR}/emacs.1
135 chmod 444 ${MANDIR}/emacs.1
136 -mv -f ${INSTALLBIN}/emacs ${INSTALLBIN}/emacs.old
137 cp src/xemacs ${INSTALLBIN}/emacs
138 chmod 1755 ${INSTALLBIN}/emacs
139 -rm -f ${INSTALLBIN}/emacs.old
141 mkdir: FRC
142 -mkdir ${LIBROOT}
143 -chmod 777 ${LIBROOT}
145 distclean:
146 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} distclean); done
148 clean:
149 cd src; make clean
150 cd lib-src; make clean
152 lockdir:
153 -mkdir ${LOCKDIR}
154 -chmod 777 ${LOCKDIR}
156 FRC:
158 tags: lib-src
159 cd src; ../arch-lib/etags *.[ch] ../lisp/*.el ../lisp/term/*.el