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