*** empty log message ***
[emacs.git] / Makefile.in
blob7c5a3d742c4373493ae56ac06ef180db11223ffd
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 install.aix to install on AIX.
9 # make tags to update tags tables
11 # make distclean to delete everything that wasn't in the distribution
12 # This is a very dangerous thing to do!
13 # make clean
14 # This is a little less dangerous.
16 SHELL = /bin/sh
18 # ==================== Where to install things ====================
19 # Note that on system V you must change MANDIR to /usr/local/man/man1.
21 # Where to install all of Emacs's data files - the lisp code,
22 # documentation tree, and the architecture-dependent and -independent
23 # libraries. If this is not the directory we're building under
24 # already, the `install' targets will move or copy it there. The
25 # default definitions for the variables below are expressed in terms
26 # of this one, so you may not need to change them.
27 LIBROOT=/gd/gnu/emacs
29 # This is where the `install' make target should place the binaries
30 # people will want to run directly (like etags and Emacs itself).
31 INSTALLBIN=/usr/local/bin
33 # Emacs will search this path to find its elisp files. This should be
34 # a colon-separated list of directories. Strictly speaking, all the
35 # elisp files should go under DATADIR (below), since both elisp source
36 # and compiled elisp are completely portable, but it's traditional to
37 # give the lisp files their own subdirectory.
38 LISPPATH=/gd/gnu/emacs/local-lisp:/gd/gnu/emacs/lisp
40 # Emacs will look here for its architecture-independent files (like
41 # the tutorial and the zippy database).
42 DATADIR=/gd/gnu/emacs/share-lib
44 # Emacs will look here for its architecture-dependent files, like
45 # executables for its utilities.
46 LIBDIR=/gd/gnu/emacs/arch-lib
48 # The locking directory, where the Emacs locking code keeps track of
49 # which files are currently being edited.
50 LOCKDIR=/gd/gnu/emacs/lock
52 # This is where the `install' make target should place the man pages
53 # for the binaries it installs.
54 MANDIR= /usr/man/man1
58 # Flags passed down to subdirectory makefiles.
59 MFLAGS=
61 # Subdirectories to make recursively. `lisp' is not included
62 # because the compiled lisp files are part of the distribution
63 # and you cannot remake them without installing Emacs first.
64 SUBDIR= lib-src src
66 # Subdirectories to install
67 COPYDIR= arch-lib share-lib info lisp
69 # Subdirectories to clean
70 CLEANDIR= ${COPYDIR} lisp/term
72 all: src/paths.h ${SUBDIR}
74 src/paths.h: Makefile src/paths.h-dist
75 /bin/sed < src/paths.h-dist > src/paths.h \
76 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "$(LISPPATH)";' \
77 -e 's;\(#.*PATH_EXEC\).*$$;\1 "$(LIBDIR)";' \
78 -e 's;\(#.*PATH_DATA\).*$$;\1 "$(DATADIR)";' \
79 -e 's;\(#.*LOCK\).*$$;\1 "$(LOCKDIR)/";'
81 src: lib-src
83 .RECURSIVE: ${SUBDIR}
85 ${SUBDIR}: FRC
86 cd $@; make ${MFLAGS} all
88 install: all mkdir lockdir
89 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
90 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xf - ) ;\
91 for i in ${CLEANDIR}; do \
92 (rm -rf ${LIBROOT}/$$i/RCS; \
93 rm -f ${LIBROOT}/$$i/\#*; \
94 rm -f ${LIBROOT}/$$i/*~); \
95 done \
96 else true; \
98 install -c -s arch-lib/emacsclient ${INSTALLBIN}/emacsclient
99 install -c -s arch-lib/etags ${INSTALLBIN}/etags
100 install -c -s arch-lib/ctags ${INSTALLBIN}/ctags
101 install -c -s -m 1755 src/xemacs ${INSTALLBIN}/xemacs
102 install -c -m 444 share-lib/emacs.1 ${MANDIR}/emacs.1
103 -rm -f ${INSTALLBIN}/emacs
104 mv ${INSTALLBIN}/xemacs ${INSTALLBIN}/emacs
106 install.sysv: all mkdir lockdir
107 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
108 find ${COPYDIR} -print | cpio -pdum ${LIBROOT} ;\
109 for i in ${CLEANDIR}; do \
110 (rm -rf ${LIBROOT}/$$i/RCS; \
111 rm -f ${LIBROOT}/$$i/\#*; \
112 rm -f ${LIBROOT}/$$i/*~); \
113 done \
114 else true; \
116 -cpset arch-lib/emacsclient ${INSTALLBIN}/emacsclient 755 bin bin
117 -cpset arch-lib/etags ${INSTALLBIN}/etags 755 bin bin
118 -cpset arch-lib/ctags ${INSTALLBIN}/ctags 755 bin bin
119 -cpset share-lib/emacs.1 ${MANDIR}/emacs.1 444 bin bin
120 -/bin/rm -f ${INSTALLBIN}/emacs
121 -cpset src/xemacs ${INSTALLBIN}/emacs 1755 bin bin
123 install.xenix: all mkdir lockdir
124 if [ `pwd` != `(cd ${LIBROOT}; pwd)` ] ; then \
125 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xpf - ) ;\
126 for i in ${CLEANDIR}; do \
127 (rm -rf ${LIBROOT}/$$i/RCS; \
128 rm -f ${LIBROOT}/$$i/\#*; \
129 rm -f ${LIBROOT}/$$i/*~); \
130 done \
131 else true; \
133 cp arch-lib/etags arch-lib/ctags arch-lib/emacsclient ${INSTALLBIN}
134 chmod 755 ${INSTALLBIN}/etags ${INSTALLBIN}/ctags ${INSTALLBIN}/emacsclient
135 cp share-lib/emacs.1 ${MANDIR}/emacs.1
136 chmod 444 ${MANDIR}/emacs.1
137 -mv -f ${INSTALLBIN}/emacs ${INSTALLBIN}/emacs.old
138 cp src/xemacs ${INSTALLBIN}/emacs
139 chmod 1755 ${INSTALLBIN}/emacs
140 -rm -f ${INSTALLBIN}/emacs.old
142 install.aix: all mkdir lockdir
143 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
144 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xBf - ) ;\
145 for i in ${CLEANDIR}; do \
146 (rm -rf ${LIBROOT}/$$i/RCS; \
147 rm -f ${LIBROOT}/$$i/\#*; \
148 rm -f ${LIBROOT}/$$i/*~); \
149 done \
150 else true; \
152 install -f ${INSTALLBIN} etc/emacsclient
153 install -f ${INSTALLBIN} etc/etags
154 install -f ${INSTALLBIN} etc/ctags
155 install -M 1755 -f ${INSTALLBIN} src/xemacs
156 install -M 444 -f ${MANDIR} etc/emacs.1
157 -rm -f ${INSTALLBIN}/emacs
158 mv ${INSTALLBIN}/xemacs ${INSTALLBIN}/emacs
160 mkdir: FRC
161 -mkdir ${LIBROOT}
162 -chmod 777 ${LIBROOT}
164 distclean:
165 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} distclean); done
167 clean:
168 cd src; make clean
169 cd lib-src; make clean
171 lockdir:
172 -mkdir ${LOCKDIR}
173 -chmod 777 ${LOCKDIR}
175 FRC:
177 tags: lib-src
178 cd src; ../arch-lib/etags *.[ch] ../lisp/*.el ../lisp/term/*.el