Modified to use cookie.el
[emacs.git] / lib-src / Makefile.in
blob09e98064afc9ec433ae4a467ab497367bcc6f110
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 CONFIG_CFLAGS=-g
19 LOADLIBES=
20 version=version-not-set
21 configname=configuration-name-not-set
23 # ==================== Where To Install Things ====================
25 # The default location for installation. Everything is placed in
26 # subdirectories of this directory. The default values for many of
27 # the variables below are expressed in terms of this one, so you may
28 # not need to change them.
29 prefix=/usr/local
31 # Like `prefix', but used for architecture-specific files.
32 exec_prefix=${prefix}
34 # Where to install Emacs and other binaries that people will want to
35 # run directly (like etags).
36 bindir=${exec_prefix}/bin
38 # Where to install and expect executable files to be run by Emacs
39 # rather than directly by users, and other architecture-dependent
40 # data. ${archlibdir} is usually below this.
41 libdir=${exec_prefix}/lib
43 # Where to find the source code - setting this to anything but
44 # . doesn't work yet. The source code for Emacs's C kernel is
45 # expected to be in ${srcdir}/src, and the source code for Emacs's
46 # utility programs is expected to be in ${srcdir}/lib-src. This is
47 # set by the configure script's `--srcdir' option.
48 srcdir=.
50 # ==================== Emacs-specific directories ====================
52 # These variables hold the values Emacs will actually use. They are
53 # based on the values of the standard Make variables above.
55 # Where to put executables to be run by Emacs rather than the user.
56 # This path usually includes the Emacs version and configuration name,
57 # so that multiple configurations for multiple versions of Emacs may
58 # be installed at once.
59 archlibdir=${libdir}/emacs/${version}/${configname}
61 # ====================== Developer's configuration =======================
63 # The following assignments make sense if you're running Emacs on a single
64 # machine, one version at a time, and you want changes to the lisp and etc
65 # directories in the source tree to show up immediately in your working
66 # environment. It saves a great deal of disk space by not duplicating the
67 # lisp and etc directories.
69 # archlibdir=${srcdir}/bin
71 # ==================== Utility Programs for the Build ====================
73 # Allow the user to specify the install program.
74 INSTALL = install
75 INSTALLFLAGS = -c
76 INSTALL_PROGRAM = ${INSTALL}
77 INSTALL_DATA = ${INSTALL}
79 # ============================= Targets ==============================
81 # Things that a user might actually run, which should be installed in bindir.
82 INSTALLABLES = etags ctags emacsclient b2m rcs-checkin
84 # Things that Emacs runs internally, or during the build process,
85 # which should not be installed in bindir.
86 UTILITIES= test-distrib make-path wakeup make-docfile digest-doc sorted-doc \
87 movemail cvtmail fakemail yow env emacsserver hexl timer
89 # Like UTILITIES, but they're not system-dependent, and should not be
90 # deleted by the distclean target.
91 SCRIPTS= rcs2log vcdiff
93 EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS}
95 SOURCES = COPYING ChangeLog Makefile.in README aixcc.lex emacs.csh \
96 makedoc.com *.[chy] rcs2log vcdiff
98 ### We need to #define emacs to get the right versions of some files.
99 ### Some other files - those shared with other GNU utilities - need
100 ### HAVE_CONFIG_H #defined before they know they can take advantage of
101 ### the information in ../src/config.h.
102 CFLAGS=${CONFIG_CFLAGS} -Demacs -DHAVE_CONFIG_H -I../src
104 all: ${EXECUTABLES}
106 ### Install the internal utilities. Until they are installed, we can
107 ### just run them directly from lib-src.
108 ${archlibdir}: all
109 @echo
110 @echo "Installing utilities run internally by Emacs."
111 ./make-path ${archlibdir}
112 if [ `(cd ${archlibdir};/bin/pwd)` != `/bin/pwd` ]; then \
113 for file in ${EXECUTABLES} ; do \
114 cp $${file} ${archlibdir} ; \
115 chmod 755 ${archlibdir}/$${file} ; \
116 done ; \
118 @echo
119 @echo "Changing the owner and group of Emacs's utility programs to \`bin'."
120 @echo "(You may ignore errors here if you don't care about this.)"
121 -for file in ${EXECUTABLES} ; do \
122 chgrp bin ${archlibdir}/$${file} ; \
123 chown bin ${archlibdir}/$${file} ; \
124 done
126 # We don't need to install `wakeup' explicitly, because it will be copied when
127 # this whole directory is copied.
128 install: ${archlibdir}
129 @echo
130 @echo "Installing utilities for users to run."
131 for file in emacsclient etags ctags b2m ; do \
132 cp $${file} ${bindir}/$${file}.new ; \
133 chmod 755 ${bindir}/$${file}.new ; \
134 done
135 @echo
136 @echo "Changing the owner and group of utility programs to \`bin'."
137 @echo "(You may ignore errors here if you don't care about this.)"
138 -for file in emacsclient etags ctags b2m ; do \
139 chgrp bin ${bindir}/$${file}.new ; \
140 chown bin ${bindir}/$${file}.new ; \
141 mv ${bindir}/$${file}.new ${bindir}/$${file} ; \
142 done
144 clean mostlyclean:
145 -rm -f ${INSTALLABLES} ${UTILITIES} core *.o
147 distclean:
148 -rm -f ${INSTALLABLES} ${UTILITIES} ../etc/DOC* core *.o
150 realclean: distclean
151 -rm TAGS aixcc.c
153 extraclean: realclean
154 -rm -f *~ \#*
156 unlock:
157 chmod u+w $(SOURCES)
159 relock:
160 chmod u-w $(SOURCES)
162 # Test the contents of the directory.
163 check:
164 @echo "We don't have any tests for GNU Emacs yet."
166 TAGS: etags
167 etags *.[ch]
169 # This verifies that the non-ASCII characters in the file `testfile'
170 # have not been clobbered by whatever means were used to copy and
171 # distribute Emacs. If they were clobbered, all the .elc files were
172 # clobbered too.
173 test-distrib: test-distrib.c
174 $(CC) -o test-distrib test-distrib.c
175 ./test-distrib
177 GETOPTOBJS = getopt.o getopt1.o
178 GETOPTDEPS = $(GETOPTOBJS) getopt.h
179 getopt.o: getopt.c getopt.h
180 getopt1.o: getopt1.c getopt.h
182 etags: etags.c $(GETOPTDEPS)
183 $(CC) ${CFLAGS} -DETAGS etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags
185 ctags: etags.c $(GETOPTDEPS)
186 $(CC) ${CFLAGS} -DCTAGS etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags
188 wakeup: wakeup.c
189 $(CC) ${CFLAGS} wakeup.c $(LOADLIBES) -o wakeup
191 make-docfile: make-docfile.c
192 $(CC) ${CFLAGS} make-docfile.c $(LOADLIBES) -o make-docfile
194 digest-doc: digest-doc.c
195 $(CC) ${CFLAGS} digest-doc.c $(LOADLIBES) -o digest-doc
197 sorted-doc: sorted-doc.c
198 $(CC) ${CFLAGS} sorted-doc.c $(LOADLIBES) -o sorted-doc
200 b2m: b2m.c ../src/config.h
201 $(CC) ${CFLAGS} b2m.c $(LOADLIBES) -o b2m
203 movemail: movemail.c ../src/config.h
204 $(CC) ${CFLAGS} movemail.c $(LOADLIBES) -o movemail
206 cvtmail: cvtmail.c
207 $(CC) ${CFLAGS} cvtmail.c $(LOADLIBES) -o cvtmail
209 fakemail: fakemail.c ../src/config.h
210 $(CC) ${CFLAGS} fakemail.c $(LOADLIBES) -o fakemail
212 yow: yow.c ../src/paths.h
213 $(CC) ${CFLAGS} yow.c $(LOADLIBES) -o yow
215 env: env.c ../src/config.h
216 $(CC) -DEMACS ${CFLAGS} env.c $(LOADLIBES) -o env
218 emacsserver: emacsserver.c ../src/config.h
219 $(CC) ${CFLAGS} emacsserver.c $(LOADLIBES) -o emacsserver
221 emacsclient: emacsclient.c ../src/config.h
222 $(CC) ${CFLAGS} emacsclient.c $(LOADLIBES) -o emacsclient
224 hexl: hexl.c
225 $(CC) ${CFLAGS} hexl.c $(LOADLIBES) -o hexl
227 getdate.o: getdate.y ../src/config.h
228 ${YACC} ${YFLAGS} getdate.y
229 $(CC) $(CFLAGS) -c y.tab.c
230 mv y.tab.o getdate.o
231 timer: getdate.o timer.o
232 $(CC) $(CFLAGS) getdate.o timer.o -o timer
234 make-path: make-path.c
235 $(CC) $(CFLAGS) make-path.c -o make-path
237 # These are NOT included in INSTALLABLES or UTILITIES.
238 # See ../src/ymakefile.
239 emacstool: emacstool.c
240 $(CC) emacstool.c -o emacstool ${CFLAGS} \
241 -lsuntool -lsunwindow -lpixrect $(LOADLIBES)
243 # For SUN Japanese Language Environment
244 nemacstool: emacstool.c
245 $(CC) -o nemacstool -DJLE ${CFLAGS} emacstool.c \
246 -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
248 xvetool: emacstool.c
249 $(CC) -o xvetool -DXVIEW ${CFLAGS} emacstool.c \
250 -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
251 $(LOADLIBES)
253 xveterm: emacstool.c
254 $(CC) -o xveterm -DXVIEW -DTTERM ${CFLAGS} emacstool.c \
255 -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
256 $(LOADLIBES)
258 aixcc: aixcc.c
259 $(CC) $(CFLAGS) -o aixcc aixcc.c
261 aixcc.c: aixcc.lex
262 lex aixcc.lex
263 mv lex.yy.c aixcc.c