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