(make_lispy_event): Clear all but 0377 in event->code.
[emacs.git] / lib-src / Makefile.in
blob2ea43a779899925d383b3ffeab0dd4b923148223
1 # DIST: This is the distribution Makefile for Emacs. configure can
2 # DIST: make most of the changes to this file you might want, so try
3 # DIST: that first.
5 # add -DUSG for SysV movemail and timer
6 # For Xenix, add the following for movemail:
7 # LOADLIBES= -lx
8 # For Mips, the following is needed for who knows what.
9 # LOADLIBES = -lmld /usr/bsd43/usr/lib/libc.a
11 # Avoid trouble on systems where the `SHELL' variable might be
12 # inherited from the environment.
13 SHELL = /bin/sh
15 # ==================== Things `configure' might edit ====================
17 CC=cc
18 CFLAGS=-g
19 ALLOCA=
20 C_SWITCH_SYSTEM=
21 LOADLIBES=
22 YACC=yacc
23 version=version-not-set
24 configname=configuration-name-not-set
26 # ==================== Where To Install Things ====================
28 # The default location for installation. Everything is placed in
29 # subdirectories of this directory. The default values for many of
30 # the variables below are expressed in terms of this one, so you may
31 # not need to change them.
32 prefix=/usr/local
34 # Like `prefix', but used for architecture-specific files.
35 exec_prefix=${prefix}
37 # Where to install Emacs and other binaries that people will want to
38 # run directly (like etags).
39 bindir=${exec_prefix}/bin
41 # Where to install and expect executable files to be run by Emacs
42 # rather than directly by users, and other architecture-dependent
43 # data. ${archlibdir} is usually below this.
44 libdir=${exec_prefix}/lib
46 # Where to find the source code. This is
47 # set by the configure script's `--srcdir' option.
48 # However, the value of ${srcdir} in this makefile
49 # is not identical to what was specified with --srcdir.
50 # The variable here has `/lib-src' added at the end.
51 srcdir=@srcdir@/lib-src
52 VPATH=@srcdir@/lib-src
54 # ==================== Emacs-specific directories ====================
56 # These variables hold the values Emacs will actually use. They are
57 # based on the values of the standard Make variables above.
59 # Where to put executables to be run by Emacs rather than the user.
60 # This path usually includes the Emacs version and configuration name,
61 # so that multiple configurations for multiple versions of Emacs may
62 # be installed at once.
63 archlibdir=${libdir}/emacs/${version}/${configname}
65 # ====================== Developer's configuration =======================
67 # The following assignments make sense if you're running Emacs on a single
68 # machine, one version at a time, and you want changes to the lisp and etc
69 # directories in the source tree to show up immediately in your working
70 # environment. It saves a great deal of disk space by not duplicating the
71 # lisp and etc directories.
73 # archlibdir=${srcdir}/bin
75 # ==================== Utility Programs for the Build ====================
77 # Allow the user to specify the install program.
78 INSTALL = install
79 INSTALLFLAGS = -c
80 INSTALL_PROGRAM = ${INSTALL}
81 INSTALL_DATA = ${INSTALL}
83 # ============================= Targets ==============================
85 # Things that a user might actually run, which should be installed in bindir.
86 INSTALLABLES = etags ctags emacsclient b2m
87 INSTALLABLE_SCRIPTS = rcs-checkin
89 # Things that Emacs runs internally, or during the build process,
90 # which should not be installed in bindir.
91 UTILITIES= test-distrib make-path wakeup make-docfile digest-doc sorted-doc \
92 movemail cvtmail fakemail yow env emacsserver hexl timer
94 # Like UTILITIES, but they're not system-dependent, and should not be
95 # deleted by the distclean target.
96 SCRIPTS= rcs2log vcdiff
98 EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
100 SOURCES = COPYING ChangeLog Makefile.in README aixcc.lex emacs.csh \
101 makedoc.com *.[chy] rcs2log vcdiff
103 ### We need to #define emacs to get the right versions of some files.
104 ### Some other files - those shared with other GNU utilities - need
105 ### HAVE_CONFIG_H #defined before they know they can take advantage of
106 ### the information in ../src/config.h.
107 ALL_CFLAGS = ${C_SWITCH_SYSTEM} -Demacs -DHAVE_CONFIG_H \
108 -I${srcdir} -I${srcdir}/../src -I. -I../src ${CFLAGS}
109 CPP_CFLAGS = ${C_SWITCH_SYSTEM} -Demacs -DHAVE_CONFIG_H \
110 -I${srcdir} -I${srcdir}/../src -I. -I../src ${CPPFLAGS} ${CFLAGS}
111 # This is the default compilation command.
112 # But we should never rely on it, because some make version
113 # failed to find it for getopt.o. Using an explicit command made it work.
114 .c.o:
115 ${CC} -c ${CPP_CFLAGS} $<
117 all: ${UTILITIES} ${INSTALLABLES}
119 ### Install the internal utilities. Until they are installed, we can
120 ### just run them directly from lib-src.
121 ${archlibdir}: all
122 @echo
123 @echo "Installing utilities run internally by Emacs."
124 ./make-path ${archlibdir}
125 if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
126 for file in ${UTILITIES} ${INSTALLABLES}; do \
127 cp $${file} ${archlibdir} ; \
128 chmod 755 ${archlibdir}/$${file} ; \
129 done ; \
130 cd ${srcdir}; for file in ${SCRIPTS} ${INSTALLABLE_SCRIPTS}; do \
131 cp $${file} ${archlibdir} ; \
132 chmod 755 ${archlibdir}/$${file} ; \
133 done ; \
135 @echo
136 @echo "Changing the owner and group of Emacs's utility programs to \`bin'."
137 @echo "(You may ignore errors here if you don't care about this.)"
138 -for file in ${EXECUTABLES} ; do \
139 chgrp bin ${archlibdir}/$${file} ; \
140 chown bin ${archlibdir}/$${file} ; \
141 done
143 # We don't need to install `wakeup' explicitly, because it will be copied when
144 # this whole directory is copied.
145 # We use .n, not .new as before, to avoid exceeding the 14-character limit.
146 install: ${archlibdir}
147 @echo
148 @echo "Installing utilities for users to run."
149 for file in ${INSTALLABLES} ; do \
150 cp $${file} ${bindir}/$${file}.n ; \
151 chmod 755 ${bindir}/$${file}.n ; \
152 done
153 for file in ${INSTALLABLE_SCRIPTS} ; do \
154 cp ${srcdir}/$${file} ${bindir}/$${file}.n ; \
155 chmod 755 ${bindir}/$${file}.n ; \
156 done
157 @echo
158 @echo "Changing the owner and group of utility programs to \`bin'."
159 @echo "(You may ignore errors here if you don't care about this.)"
160 -for file in ${INSTALLABLES} ${INSTALLABLE_SCRIPTS} ; do \
161 chgrp bin ${bindir}/$${file}.n ; \
162 chown bin ${bindir}/$${file}.n ; \
163 rm -f ${bindir}/$${file} ; \
164 mv ${bindir}/$${file}.n ${bindir}/$${file} ; \
165 done
167 uninstall:
168 (cd ${bindir}; \
169 rm -f ${INSTALLABLES} ${INSTALLABLE_SCRIPTS})
170 (cd ${archlibdir}; \
171 rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
173 clean mostlyclean:
174 -rm -f ${INSTALLABLES} ${UTILITIES} core *.o
176 distclean: clean
177 -rm -f ../etc/DOC* *.tab.c *.tab.h aixcc.c TAGS
179 realclean: distclean
180 true
182 extraclean: realclean
183 -rm -f *~ \#*
185 unlock:
186 chmod u+w $(SOURCES)
188 relock:
189 chmod u-w $(SOURCES)
191 # Test the contents of the directory.
192 check:
193 @echo "We don't have any tests for GNU Emacs yet."
195 TAGS: etags
196 etags *.[ch]
198 # This verifies that the non-ASCII characters in the file `testfile'
199 # have not been clobbered by whatever means were used to copy and
200 # distribute Emacs. If they were clobbered, all the .elc files were
201 # clobbered too.
202 test-distrib: ${srcdir}/test-distrib.c
203 $(CC) -o test-distrib ${srcdir}/test-distrib.c
204 ./test-distrib ${srcdir}/testfile
206 GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
207 GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
208 getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
209 ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c
210 getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h
211 ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c
213 etags: ${srcdir}/etags.c $(GETOPTDEPS) ../src/config.h
214 $(CC) ${CPP_CFLAGS} -DETAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags
216 # We depend on etags to assure that parallel makes don't write two
217 # etags.o files on top of each other.
218 ctags: ${srcdir}/etags.c $(GETOPTDEPS) etags
219 $(CC) ${CPP_CFLAGS} -DCTAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags
221 wakeup: ${srcdir}/wakeup.c
222 $(CC) ${CPP_CFLAGS} ${srcdir}/wakeup.c $(LOADLIBES) -o wakeup
224 make-docfile: ${srcdir}/make-docfile.c
225 $(CC) ${CPP_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile
227 digest-doc: ${srcdir}/digest-doc.c
228 $(CC) ${CPP_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc
230 sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA}
231 $(CC) ${CPP_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc
233 b2m: ${srcdir}/b2m.c ../src/config.h
234 $(CC) -I${srcdir}/../src ${CPP_CFLAGS} ${srcdir}/b2m.c $(LOADLIBES) -o b2m
236 movemail: ${srcdir}/movemail.c ../src/config.h
237 $(CC) -I${srcdir}/../src ${CPP_CFLAGS} ${srcdir}/movemail.c $(LOADLIBES) -o movemail
239 cvtmail: ${srcdir}/cvtmail.c
240 $(CC) ${CPP_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail
242 fakemail: ${srcdir}/fakemail.c ../src/config.h
243 $(CC) -I${srcdir}/../src ${CPP_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail
245 yow: ${srcdir}/yow.c ../src/paths.h
246 $(CC) ${CPP_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow
248 env: ${srcdir}/env.c ../src/config.h
249 $(CC) -DEMACS -I${srcdir}/../src ${CPP_CFLAGS} ${srcdir}/env.c $(LOADLIBES) -o env
251 emacsserver: ${srcdir}/emacsserver.c ../src/config.h
252 $(CC) -I${srcdir}/../src ${CPP_CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver
254 emacsclient: ${srcdir}/emacsclient.c ../src/config.h
255 $(CC) -I${srcdir}/../src ${CPP_CFLAGS} ${srcdir}/emacsclient.c $(LOADLIBES) -o emacsclient
257 hexl: ${srcdir}/hexl.c
258 $(CC) ${CPP_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
260 TIMEROBJS=getdate.o timer.o $(ALLOCA)
261 getdate.o: ${srcdir}/getdate.y ../src/config.h
262 ${YACC} ${YFLAGS} ${srcdir}/getdate.y
263 $(CC) -I${srcdir}/../src $(CPP_CFLAGS) -c y.tab.c
264 mv y.tab.o getdate.o
265 timer.o: ${srcdir}/timer.c ../src/config.h
266 $(CC) -c -I${srcdir}/../src $(CPP_CFLAGS) ${srcdir}/timer.c
267 timer: ${TIMEROBJS}
268 $(CC) -I${srcdir}/../src $(ALL_CFLAGS) ${TIMEROBJS} $(LOADLIBES) -o timer
270 make-path: ${srcdir}/make-path.c
271 $(CC) $(CPP_CFLAGS) ${srcdir}/make-path.c -o make-path
273 # These are NOT included in INSTALLABLES or UTILITIES.
274 # See ../src/ymakefile.
275 emacstool: ${srcdir}/emacstool.c
276 $(CC) ${srcdir}/emacstool.c -o emacstool ${CPP_CFLAGS} \
277 -lsuntool -lsunwindow -lpixrect $(LOADLIBES)
279 # For SUN Japanese Language Environment
280 nemacstool: ${srcdir}/emacstool.c
281 $(CC) -o nemacstool -DJLE ${CPP_CFLAGS} ${srcdir}/emacstool.c \
282 -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
284 xvetool: ${srcdir}/emacstool.c
285 $(CC) -o xvetool -DXVIEW ${CPP_CFLAGS} ${srcdir}/emacstool.c \
286 -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
287 $(LOADLIBES)
289 xveterm: ${srcdir}/emacstool.c
290 $(CC) -o xveterm -DXVIEW -DTTERM ${CPP_CFLAGS} ${srcdir}/emacstool.c \
291 -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
292 $(LOADLIBES)
294 aixcc: ${srcdir}/aixcc.c
295 $(CC) $(CPP_CFLAGS) -o aixcc ${srcdir}/aixcc.c
297 aixcc.c: ${srcdir}/aixcc.lex
298 lex ${srcdir}/aixcc.lex
299 mv lex.yy.c aixcc.c