604
|
1 # This is the distribution Makefile for Emacs. configure can make
|
491
|
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
|
596
|
8 # make install.aix to install on AIX.
|
491
|
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
|
|
16 SHELL = /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.
|
604
|
27 LIBROOT=/home/gd/gnu/emacs
|
491
|
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).
|
|
31 INSTALLBIN=/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.
|
604
|
38 LISPPATH=/home/gd/gnu/emacs/local-lisp:/home/gd/gnu/emacs/lisp
|
491
|
39
|
|
40 # Emacs will look here for its architecture-independent files (like
|
|
41 # the tutorial and the zippy database).
|
604
|
42 DATADIR=/home/gd/gnu/emacs/etc
|
491
|
43
|
|
44 # Emacs will look here for its architecture-dependent files, like
|
|
45 # executables for its utilities.
|
604
|
46 LIBDIR=/home/gd/gnu/emacs/arch-lib
|
491
|
47
|
|
48 # The locking directory, where the Emacs locking code keeps track of
|
|
49 # which files are currently being edited.
|
604
|
50 LOCKDIR=/home/gd/gnu/emacs/lock
|
491
|
51
|
|
52 # This is where the `install' make target should place the man pages
|
|
53 # for the binaries it installs.
|
|
54 MANDIR= /usr/man/man1
|
|
55
|
|
56
|
|
57
|
|
58 # Flags passed down to subdirectory makefiles.
|
|
59 MFLAGS=
|
|
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.
|
|
64 SUBDIR= lib-src src
|
|
65
|
|
66 # Subdirectories to install
|
604
|
67 COPYDIR= arch-lib etc info lisp
|
491
|
68
|
|
69 # Subdirectories to clean
|
|
70 CLEANDIR= ${COPYDIR} lisp/term
|
|
71
|
|
72 all: src/paths.h ${SUBDIR}
|
|
73
|
|
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)";' \
|
604
|
79 -e 's;\(#.*PATH_LOCK\).*$$;\1 "$(LOCKDIR)/";' \
|
|
80 -e 's;\(#.*PATH_SUPERLOCK\).*$$;\1 "$(LOCKDIR)/!!!SuperLock!!!";'
|
491
|
81
|
|
82 src: lib-src
|
|
83
|
|
84 .RECURSIVE: ${SUBDIR}
|
|
85
|
|
86 ${SUBDIR}: FRC
|
|
87 cd $@; make ${MFLAGS} all
|
|
88
|
|
89 install: all mkdir lockdir
|
|
90 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
|
522
|
91 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xf - ) ;\
|
491
|
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
|
604
|
103 install -c -m 444 etc/emacs.1 ${MANDIR}/emacs.1
|
491
|
104 -rm -f ${INSTALLBIN}/emacs
|
|
105 mv ${INSTALLBIN}/xemacs ${INSTALLBIN}/emacs
|
|
106
|
|
107 install.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
|
604
|
120 -cpset etc/emacs.1 ${MANDIR}/emacs.1 444 bin bin
|
491
|
121 -/bin/rm -f ${INSTALLBIN}/emacs
|
|
122 -cpset src/xemacs ${INSTALLBIN}/emacs 1755 bin bin
|
|
123
|
|
124 install.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
|
604
|
136 cp etc/emacs.1 ${MANDIR}/emacs.1
|
491
|
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
|
596
|
143 install.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
|
491
|
161 mkdir: FRC
|
|
162 -mkdir ${LIBROOT}
|
|
163 -chmod 777 ${LIBROOT}
|
|
164
|
|
165 distclean:
|
|
166 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} distclean); done
|
|
167
|
|
168 clean:
|
|
169 cd src; make clean
|
|
170 cd lib-src; make clean
|
|
171
|
|
172 lockdir:
|
|
173 -mkdir ${LOCKDIR}
|
|
174 -chmod 777 ${LOCKDIR}
|
|
175
|
|
176 FRC:
|
|
177
|
|
178 tags: lib-src
|
|
179 cd src; ../arch-lib/etags *.[ch] ../lisp/*.el ../lisp/term/*.el
|