(split-window-vertically): If size is negative, measure from bottom.
[emacs.git] / lib-src / Makefile.in
blob73c099d1f344142bac94014ce7c2b20a09eb633a
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' will edit ====================
17 CC=@CC@
18 CFLAGS=@CFLAGS@
19 ALLOCA=@ALLOCA@
20 C_SWITCH_SYSTEM=@c_switch_system@
21 C_SWITCH_MACHINE=@c_switch_machine@
22 LOADLIBES=@libsrc_libs@
23 YACC=@YACC@
24 version=@version@
25 configname=@configuration@
27 # ==================== Where To Install Things ====================
29 # The default location for installation. Everything is placed in
30 # subdirectories of this directory. The default values for many of
31 # the variables below are expressed in terms of this one, so you may
32 # not need to change them. This is set with the --prefix option to
33 # `../configure'.
34 prefix=@prefix@
36 # Like `prefix', but used for architecture-specific files. This is
37 # set with the --exec-prefix option to `../configure'.
38 exec_prefix=@exec_prefix@
40 # Where to install Emacs and other binaries that people will want to
41 # run directly (like etags). This is set with the --bindir option
42 # to `../configure'.
43 bindir=@bindir@
45 # Where to install and expect executable files to be run by Emacs
46 # rather than directly by users, and other architecture-dependent
47 # data. ${archlibdir} is usually below this. This is set with the
48 # --libdir option to `../configure'.
49 libdir=@libdir@
51 # Where to find the source code. This is set by the configure
52 # script's `--srcdir' option. However, the value of ${srcdir} in
53 # this makefile is not identical to what was specified with --srcdir,
54 # since the variable here has `/lib-src' added at the end.
55 srcdir=@srcdir@
56 VPATH=@srcdir@
58 # ==================== Emacs-specific directories ====================
60 # These variables hold the values Emacs will actually use. They are
61 # based on the values of the standard Make variables above.
63 # Where to put executables to be run by Emacs rather than the user.
64 # This path usually includes the Emacs version and configuration name,
65 # so that multiple configurations for multiple versions of Emacs may
66 # be installed at once. This can be set with the --archlibdir option
67 # to `../configure'.
68 archlibdir=@archlibdir@
70 # ==================== Utility Programs for the Build ====================
72 # ../configure figures out the correct values for these.
73 INSTALL = @INSTALL@
74 INSTALL_PROGRAM = @INSTALL_PROGRAM@
75 INSTALL_DATA = @INSTALL_DATA@
77 # ============================= Targets ==============================
79 # Things that a user might actually run, which should be installed in bindir.
80 INSTALLABLES = etags ctags emacsclient b2m
81 INSTALLABLE_SCRIPTS = rcs-checkin
83 # Things that Emacs runs internally, or during the build process,
84 # which should not be installed in bindir.
85 UTILITIES= test-distrib make-path wakeup profile make-docfile digest-doc \
86 sorted-doc movemail cvtmail fakemail yow emacsserver hexl timer
88 # Like UTILITIES, but they're not system-dependent, and should not be
89 # deleted by the distclean target.
90 SCRIPTS= rcs2log vcdiff
92 EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
94 SOURCES = COPYING ChangeLog Makefile.in README aixcc.lex emacs.csh \
95 makedoc.com *.[chy] rcs2log vcdiff
97 ### We need to #define emacs to get the right versions of some files.
98 ### Some other files - those shared with other GNU utilities - need
99 ### HAVE_CONFIG_H #defined before they know they can take advantage of
100 ### the information in ../src/config.h.
101 ALL_CFLAGS = ${C_SWITCH_SYSTEM} ${C_SWITCH_MACHINE} -Demacs -DHAVE_CONFIG_H \
102 -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
103 LINK_CFLAGS = ${C_SWITCH_SYSTEM} ${C_SWITCH_MACHINE} -Demacs -DHAVE_CONFIG_H \
104 -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS}
105 CPP_CFLAGS = ${C_SWITCH_SYSTEM} ${C_SWITCH_MACHINE} -Demacs -DHAVE_CONFIG_H \
106 -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
107 # This is the default compilation command.
108 # But we should never rely on it, because some make version
109 # failed to find it for getopt.o. Using an explicit command made it work.
110 .c.o:
111 ${CC} -c ${CPP_CFLAGS} $<
113 all: ${UTILITIES} ${INSTALLABLES}
115 ### Install the internal utilities. Until they are installed, we can
116 ### just run them directly from lib-src.
117 ${archlibdir}: all
118 @echo
119 @echo "Installing utilities run internally by Emacs."
120 ./make-path ${archlibdir}
121 if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
122 for file in ${UTILITIES}; do \
123 (cd ..; $(INSTALL_PROGRAM) lib-src/$$file ${archlibdir}/$$file) ; \
124 done ; \
125 for file in ${SCRIPTS}; do \
126 (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$$file ${archlibdir}/$$file); \
127 done ; \
130 # We don't need to install `wakeup' explicitly, because it will be copied when
131 # this whole directory is copied.
132 install: ${archlibdir}
133 @echo
134 @echo "Installing utilities for users to run."
135 for file in ${INSTALLABLES} ; do \
136 (cd ..; $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \
137 done
138 for file in ${INSTALLABLE_SCRIPTS} ; do \
139 (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file}) ; \
140 done
142 uninstall:
143 (cd ${bindir}; \
144 rm -f ${INSTALLABLES} ${INSTALLABLE_SCRIPTS})
145 (cd ${archlibdir}; \
146 rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
148 mostlyclean:
149 -rm -f core *.o
151 clean: mostlyclean
152 -rm -f ${INSTALLABLES} ${UTILITIES}
154 distclean: clean
155 -rm -f ../etc/DOC* *.tab.c *.tab.h aixcc.c TAGS
157 realclean: distclean
158 true
160 extraclean: realclean
161 -rm -f *~ \#*
163 unlock:
164 chmod u+w $(SOURCES)
166 relock:
167 chmod u-w $(SOURCES)
169 # Test the contents of the directory.
170 check:
171 @echo "We don't have any tests for GNU Emacs yet."
173 TAGS: etags
174 etags *.[ch]
176 # This verifies that the non-ASCII characters in the file `testfile'
177 # have not been clobbered by whatever means were used to copy and
178 # distribute Emacs. If they were clobbered, all the .elc files were
179 # clobbered too.
180 test-distrib: ${srcdir}/test-distrib.c
181 $(CC) -o test-distrib ${srcdir}/test-distrib.c
182 ./test-distrib ${srcdir}/testfile
184 GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
185 GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
186 getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
187 ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c
188 getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h
189 ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c
191 etags: ${srcdir}/etags.c $(GETOPTDEPS) ../src/config.h
192 $(CC) ${ALL_CFLAGS} -DVERSION=${version} ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags
194 # We depend on etags to assure that parallel makes don't write two
195 # etags.o files on top of each other.
196 ctags: ${srcdir}/etags.c $(GETOPTDEPS) etags
197 $(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION=${version} ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags
199 wakeup: ${srcdir}/wakeup.c
200 $(CC) ${ALL_CFLAGS} ${srcdir}/wakeup.c $(LOADLIBES) -o wakeup
202 profile: ${srcdir}/profile.c
203 $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile
205 make-docfile: ${srcdir}/make-docfile.c
206 $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile
208 digest-doc: ${srcdir}/digest-doc.c
209 $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc
211 sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA}
212 $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc
214 b2m: ${srcdir}/b2m.c ../src/config.h
215 $(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c $(LOADLIBES) -o b2m
217 movemail: ${srcdir}/movemail.c ../src/config.h
218 $(CC) ${ALL_CFLAGS} ${srcdir}/movemail.c $(LOADLIBES) -o movemail
220 cvtmail: ${srcdir}/cvtmail.c
221 $(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail
223 fakemail: ${srcdir}/fakemail.c ../src/config.h
224 $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail
226 yow: ${srcdir}/yow.c ../src/paths.h
227 $(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow
229 emacsserver: ${srcdir}/emacsserver.c ../src/config.h
230 $(CC) ${ALL_CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver
232 emacsclient: ${srcdir}/emacsclient.c ../src/config.h
233 $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(LOADLIBES) -o emacsclient
235 hexl: ${srcdir}/hexl.c
236 $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
238 TIMEROBJS=getdate.o timer.o $(ALLOCA)
239 getdate.o: ${srcdir}/getdate.y ../src/config.h
240 ${YACC} ${YFLAGS} ${srcdir}/getdate.y
241 $(CC) $(CPP_CFLAGS) -c y.tab.c
242 mv y.tab.o getdate.o
243 timer.o: ${srcdir}/timer.c ../src/config.h
244 $(CC) -c $(CPP_CFLAGS) ${srcdir}/timer.c
245 timer: ${TIMEROBJS}
246 $(CC) $(LINK_CFLAGS) ${TIMEROBJS} $(LOADLIBES) -o timer
248 make-path: ${srcdir}/make-path.c ../src/config.h
249 $(CC) $(ALL_CFLAGS) ${srcdir}/make-path.c -o make-path
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)
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)
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)
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)
272 aixcc: ${srcdir}/aixcc.c
273 $(CC) $(ALL_CFLAGS) -o aixcc ${srcdir}/aixcc.c
275 aixcc.c: ${srcdir}/aixcc.lex
276 lex ${srcdir}/aixcc.lex
277 mv lex.yy.c aixcc.c