*** empty log message ***
[bpt/emacs.git] / Makefile.in
CommitLineData
08564963 1# This is the distribution Makefile for Emacs. configure can make
86a5659e
JB
2# most of the changes to this file you might want, so try that first.
3
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
badb0a97 8# make install.aix to install on AIX.
86a5659e
JB
9# make tags to update tags tables
10#
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.
15
16SHELL = /bin/sh
17
18# ==================== Where to install things ====================
19# Note that on system V you must change MANDIR to /usr/local/man/man1.
20
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.
08564963 27LIBROOT=/home/gd/gnu/emacs
86a5659e
JB
28
29# This is where the `install' make target should place the binaries
30# people will want to run directly (like etags and Emacs itself).
31INSTALLBIN=/usr/local/bin
32
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.
08564963 38LISPPATH=/home/gd/gnu/emacs/local-lisp:/home/gd/gnu/emacs/lisp
86a5659e
JB
39
40# Emacs will look here for its architecture-independent files (like
41# the tutorial and the zippy database).
08564963 42DATADIR=/home/gd/gnu/emacs/etc
86a5659e
JB
43
44# Emacs will look here for its architecture-dependent files, like
45# executables for its utilities.
08564963 46LIBDIR=/home/gd/gnu/emacs/arch-lib
86a5659e
JB
47
48# The locking directory, where the Emacs locking code keeps track of
49# which files are currently being edited.
08564963 50LOCKDIR=/home/gd/gnu/emacs/lock
86a5659e
JB
51
52# This is where the `install' make target should place the man pages
53# for the binaries it installs.
54MANDIR= /usr/man/man1
55
56
57
58# Flags passed down to subdirectory makefiles.
59MFLAGS=
60
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.
64SUBDIR= lib-src src
65
66# Subdirectories to install
08564963 67COPYDIR= arch-lib etc info lisp
86a5659e
JB
68
69# Subdirectories to clean
70CLEANDIR= ${COPYDIR} lisp/term
71
72all: src/paths.h ${SUBDIR}
73
74src/paths.h: Makefile src/paths.h-dist
75 /bin/sed < src/paths.h-dist > src/paths.h \
86a5659e
JB
76 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "$(LISPPATH)";' \
77 -e 's;\(#.*PATH_EXEC\).*$$;\1 "$(LIBDIR)";' \
78 -e 's;\(#.*PATH_DATA\).*$$;\1 "$(DATADIR)";' \
08564963
JB
79 -e 's;\(#.*PATH_LOCK\).*$$;\1 "$(LOCKDIR)/";' \
80 -e 's;\(#.*PATH_SUPERLOCK\).*$$;\1 "$(LOCKDIR)/!!!SuperLock!!!";'
86a5659e
JB
81
82src: lib-src
83
84.RECURSIVE: ${SUBDIR}
85
86${SUBDIR}: FRC
87 cd $@; make ${MFLAGS} all
88
89install: all mkdir lockdir
90 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
f8026fd8 91 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xf - ) ;\
86a5659e
JB
92 for i in ${CLEANDIR}; do \
93 (rm -rf ${LIBROOT}/$$i/RCS; \
94 rm -f ${LIBROOT}/$$i/\#*; \
95 rm -f ${LIBROOT}/$$i/*~); \
96 done \
97 else true; \
98 fi
99 install -c -s arch-lib/emacsclient ${INSTALLBIN}/emacsclient
100 install -c -s arch-lib/etags ${INSTALLBIN}/etags
101 install -c -s arch-lib/ctags ${INSTALLBIN}/ctags
102 install -c -s -m 1755 src/xemacs ${INSTALLBIN}/xemacs
08564963 103 install -c -m 444 etc/emacs.1 ${MANDIR}/emacs.1
86a5659e
JB
104 -rm -f ${INSTALLBIN}/emacs
105 mv ${INSTALLBIN}/xemacs ${INSTALLBIN}/emacs
106
107install.sysv: all mkdir lockdir
108 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
109 find ${COPYDIR} -print | cpio -pdum ${LIBROOT} ;\
110 for i in ${CLEANDIR}; do \
111 (rm -rf ${LIBROOT}/$$i/RCS; \
112 rm -f ${LIBROOT}/$$i/\#*; \
113 rm -f ${LIBROOT}/$$i/*~); \
114 done \
115 else true; \
116 fi
117 -cpset arch-lib/emacsclient ${INSTALLBIN}/emacsclient 755 bin bin
118 -cpset arch-lib/etags ${INSTALLBIN}/etags 755 bin bin
119 -cpset arch-lib/ctags ${INSTALLBIN}/ctags 755 bin bin
08564963 120 -cpset etc/emacs.1 ${MANDIR}/emacs.1 444 bin bin
86a5659e
JB
121 -/bin/rm -f ${INSTALLBIN}/emacs
122 -cpset src/xemacs ${INSTALLBIN}/emacs 1755 bin bin
123
124install.xenix: all mkdir lockdir
125 if [ `pwd` != `(cd ${LIBROOT}; pwd)` ] ; then \
126 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xpf - ) ;\
127 for i in ${CLEANDIR}; do \
128 (rm -rf ${LIBROOT}/$$i/RCS; \
129 rm -f ${LIBROOT}/$$i/\#*; \
130 rm -f ${LIBROOT}/$$i/*~); \
131 done \
132 else true; \
133 fi
134 cp arch-lib/etags arch-lib/ctags arch-lib/emacsclient ${INSTALLBIN}
135 chmod 755 ${INSTALLBIN}/etags ${INSTALLBIN}/ctags ${INSTALLBIN}/emacsclient
08564963 136 cp etc/emacs.1 ${MANDIR}/emacs.1
86a5659e
JB
137 chmod 444 ${MANDIR}/emacs.1
138 -mv -f ${INSTALLBIN}/emacs ${INSTALLBIN}/emacs.old
139 cp src/xemacs ${INSTALLBIN}/emacs
140 chmod 1755 ${INSTALLBIN}/emacs
141 -rm -f ${INSTALLBIN}/emacs.old
142
badb0a97
JB
143install.aix: all mkdir lockdir
144 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
145 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xBf - ) ;\
146 for i in ${CLEANDIR}; do \
147 (rm -rf ${LIBROOT}/$$i/RCS; \
148 rm -f ${LIBROOT}/$$i/\#*; \
149 rm -f ${LIBROOT}/$$i/*~); \
150 done \
151 else true; \
152 fi
153 install -f ${INSTALLBIN} etc/emacsclient
154 install -f ${INSTALLBIN} etc/etags
155 install -f ${INSTALLBIN} etc/ctags
156 install -M 1755 -f ${INSTALLBIN} src/xemacs
157 install -M 444 -f ${MANDIR} etc/emacs.1
158 -rm -f ${INSTALLBIN}/emacs
159 mv ${INSTALLBIN}/xemacs ${INSTALLBIN}/emacs
160
86a5659e
JB
161mkdir: FRC
162 -mkdir ${LIBROOT}
163 -chmod 777 ${LIBROOT}
164
165distclean:
166 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} distclean); done
167
168clean:
169 cd src; make clean
170 cd lib-src; make clean
171
172lockdir:
173 -mkdir ${LOCKDIR}
174 -chmod 777 ${LOCKDIR}
175
176FRC:
177
178tags: lib-src
179 cd src; ../arch-lib/etags *.[ch] ../lisp/*.el ../lisp/term/*.el