1 # Makefile for lib-src subdirectory in GNU Emacs.
2 # Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
4 # This file is part of GNU Emacs.
6 # GNU Emacs is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU Emacs is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GNU Emacs; see the file COPYING. If not, write to
18 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 # Avoid trouble on systems where the `SHELL' variable might be
21 # inherited from the environment.
24 # ==================== Things `configure' will edit ====================
31 configuration
=@configuration@
33 # ==================== Where To Install Things ====================
35 # The default location for installation. Everything is placed in
36 # subdirectories of this directory. The default values for many of
37 # the variables below are expressed in terms of this one, so you may
38 # not need to change them. This is set with the --prefix option to
42 # Like `prefix', but used for architecture-specific files. This is
43 # set with the --exec-prefix option to `../configure'.
44 exec_prefix=@
exec_prefix@
46 # Where to install Emacs and other binaries that people will want to
47 # run directly (like etags). This is set with the --bindir option
51 # Where to install and expect executable files to be run by Emacs
52 # rather than directly by users, and other architecture-dependent
53 # data. ${archlibdir} is usually below this. This is set with the
54 # --libdir option to `../configure'.
57 # Where to find the source code. This is set by the configure
58 # script's `--srcdir' option. However, the value of ${srcdir} in
59 # this makefile is not identical to what was specified with --srcdir,
60 # since the variable here has `/lib-src' added at the end.
64 # ==================== Emacs-specific directories ====================
66 # These variables hold the values Emacs will actually use. They are
67 # based on the values of the standard Make variables above.
69 # Where to put executables to be run by Emacs rather than the user.
70 # This path usually includes the Emacs version and configuration name,
71 # so that multiple configurations for multiple versions of Emacs may
72 # be installed at once. This can be set with the --archlibdir option
74 archlibdir
=@archlibdir@
76 # ==================== Utility Programs for the Build =================
78 # ../configure figures out the correct values for these.
80 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
81 INSTALL_DATA
= @INSTALL_DATA@
83 # ========================== Lists of Files ===========================
85 # Things that a user might actually run,
86 # which should be installed in bindir.
87 INSTALLABLES
= etags ctags emacsclient b2m
88 INSTALLABLE_SCRIPTS
= rcs-checkin
90 # Things that Emacs runs internally, or during the build process,
91 # which should not be installed in bindir.
92 UTILITIES
= test-distrib make-path wakeup profile make-docfile digest-doc \
93 sorted-doc movemail cvtmail fakemail yow emacsserver hexl timer
95 # Like UTILITIES, but they're not system-dependent, and should not be
96 # deleted by the distclean target.
97 SCRIPTS
= rcs2log vcdiff
99 EXECUTABLES
= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
101 SOURCES
= COPYING ChangeLog Makefile.in README aixcc.
lex emacs.csh \
102 makedoc.com
*.
[chy
] rcs2log vcdiff
104 # ========================== start of cpp stuff =======================
105 /* From here on
, comments must be done in C syntax.
*/
107 #define NO_SHORTNAMES
108 #define THIS_IS_YMAKEFILE
110 #include "../src/config.h"
112 /* Some s
/*.h files
define this to request special libraries.
*/
117 /* Some m
/*.h files
define this to request special libraries.
*/
122 #ifndef C_SWITCH_SYSTEM
123 #define C_SWITCH_SYSTEM
126 #ifndef C_SWITCH_MACHINE
127 #define C_SWITCH_MACHINE
130 #undef MOVEMAIL_NEEDS_BLESSING
131 #ifndef MAIL_USE_FLOCK
132 #ifndef MAIL_USE_LOCKF
133 #define MOVEMAIL_NEEDS_BLESSING
137 #ifdef MOVEMAIL_NEEDS_BLESSING
138 #define BLESSMAIL blessmail
143 LOADLIBES
=LIBS_SYSTEM LIBS_MACHINE
145 /* We need to
#define emacs to get the right versions of some files.
146 Some other files
- those shared with other GNU utilities
- need
147 HAVE_CONFIG_H
#defined before they know they can take advantage of
148 the information in ..
/src
/config.h.
*/
149 ALL_CFLAGS
= C_SWITCH_SYSTEM C_SWITCH_MACHINE
-Demacs
-DHAVE_CONFIG_H \
150 -I.
-I..
/src
-I
${srcdir} -I
${srcdir}/..
/src
${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
151 LINK_CFLAGS
= C_SWITCH_SYSTEM C_SWITCH_MACHINE
-Demacs
-DHAVE_CONFIG_H \
152 -I.
-I..
/src
-I
${srcdir} -I
${srcdir}/..
/src
${LDFLAGS} ${CFLAGS}
153 CPP_CFLAGS
= C_SWITCH_SYSTEM C_SWITCH_MACHINE
-Demacs
-DHAVE_CONFIG_H \
154 -I.
-I..
/src
-I
${srcdir} -I
${srcdir}/..
/src
${CPPFLAGS} ${CFLAGS}
155 ALLOCA_CFLAGS
= C_SWITCH_SYSTEM C_SWITCH_MACHINE
-DHAVE_CONFIG_H \
156 -I.
-I..
/src
-I
${srcdir} -I
${srcdir}/..
/src
${CPPFLAGS} ${CFLAGS}
158 /* This is the default compilation command.
159 But we should never rely on it
, because some make version
160 failed to find it for getopt.o.
161 Using an explicit command made it work.
*/
163 ${CC} -c
${CPP_CFLAGS} $<
165 all: ${UTILITIES} ${INSTALLABLES}
167 #ifdef MOVEMAIL_NEEDS_BLESSING
169 ..
/src
/emacs
-batch
-l ..
/lisp
/blessmail.el
173 maybe-blessmail
: BLESSMAIL
174 #ifdef MOVEMAIL_NEEDS_BLESSING
175 /* Don
't charge ahead and do it! Let the installer decide.
176 ./blessmail ${archlibdir}/movemail */
177 @if [ `wc -l <blessmail` != 2 ] ; then \
178 dir=`sed -n -e 's
/echo mail directory
= \
(.
*\
)/\
1/p
' blessmail`; \
179 echo Assuming $$dir is really the mail spool directory, you should; \
180 echo run lib-src/blessmail ${archlibdir}/movemail; \
181 echo as root, to give movemail appropriate permissions.; \
182 echo Do that after running make install.; \
186 /* Install the internal utilities. Until they are installed, we can
187 just run them directly from lib-src. */
190 @echo "Installing utilities run internally by Emacs."
191 ./make-path ${archlibdir}
192 if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
193 for file in ${UTILITIES}; do \
194 (cd ..; $(INSTALL_PROGRAM) lib-src/$$file ${archlibdir}/$$file) ; \
196 for file in ${SCRIPTS}; do \
197 (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$$file ${archlibdir}/$$file); \
201 /* We don't need to
install `wakeup' explicitly, because it will be
202 copied when this whole directory is copied. */
203 install: ${archlibdir}
205 @echo "Installing utilities for users to run."
206 for file in ${INSTALLABLES} ; do \
207 (cd ..; $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \
209 for file in ${INSTALLABLE_SCRIPTS} ; do \
210 (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file}) ; \
215 rm -f ${INSTALLABLES} ${INSTALLABLE_SCRIPTS})
217 rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
223 -rm -f ${INSTALLABLES} ${UTILITIES}
226 -rm -f ../etc/DOC* *.tab.c *.tab.h aixcc.c TAGS
227 -rm -f Makefile Makefile.in blessmail
232 extraclean: realclean
241 /* Test the contents of the directory. */
243 @echo "We don't have any tests for GNU Emacs yet."
248 /* This verifies that the non-ASCII characters in the file `testfile
'
249 have not been clobbered by whatever means were used to copy and
250 distribute Emacs. If they were clobbered, all the .elc files were
252 test-distrib: ${srcdir}/test-distrib.c
253 $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c
254 ./test-distrib ${srcdir}/testfile
256 GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
257 GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
258 getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
259 ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c
260 getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h
261 ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c
262 alloca.o: ${srcdir}/alloca.c
263 ${CC} -c ${ALLOCA_CFLAGS} ${srcdir}/alloca.c
265 etags: ${srcdir}/etags.c $(GETOPTDEPS) ../src/config.h
266 $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags
268 /* We depend on etags to assure that parallel makes don't write two
269 etags.o files on top of each other.
*/
270 ctags
: ${srcdir}/etags.c
$(GETOPTDEPS
) etags
271 $(CC
) ${ALL_CFLAGS} -DCTAGS
-DVERSION
="\"${version}\"" ${srcdir}/etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o ctags
273 wakeup
: ${srcdir}/wakeup.c
274 $(CC
) ${ALL_CFLAGS} ${srcdir}/wakeup.c
$(LOADLIBES
) -o wakeup
276 profile
: ${srcdir}/profile.c
277 $(CC
) ${ALL_CFLAGS} ${srcdir}/profile.c
$(LOADLIBES
) -o profile
279 make-docfile
: ${srcdir}/make-docfile.c
280 $(CC
) ${ALL_CFLAGS} ${srcdir}/make-docfile.c
$(LOADLIBES
) -o make-docfile
282 digest-doc
: ${srcdir}/digest-doc.c
283 $(CC
) ${ALL_CFLAGS} ${srcdir}/digest-doc.c
$(LOADLIBES
) -o digest-doc
285 sorted-doc
: ${srcdir}/sorted-doc.c
${ALLOCA}
286 $(CC
) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c
${ALLOCA} $(LOADLIBES
) -o sorted-doc
288 b2m
: ${srcdir}/b2m.c ..
/src
/config.h
289 $(CC
) ${ALL_CFLAGS} ${srcdir}/b2m.c
$(LOADLIBES
) -o b2m
291 movemail
: ${srcdir}/movemail.c ..
/src
/config.h
292 $(CC
) ${ALL_CFLAGS} ${srcdir}/movemail.c
$(LOADLIBES
) -o movemail
294 cvtmail
: ${srcdir}/cvtmail.c
295 $(CC
) ${ALL_CFLAGS} ${srcdir}/cvtmail.c
$(LOADLIBES
) -o cvtmail
297 fakemail
: ${srcdir}/fakemail.c ..
/src
/config.h
298 $(CC
) ${ALL_CFLAGS} ${srcdir}/fakemail.c
$(LOADLIBES
) -o fakemail
300 yow
: ${srcdir}/yow.c ..
/src
/paths.h
301 $(CC
) ${ALL_CFLAGS} ${srcdir}/yow.c
$(LOADLIBES
) -o yow
303 emacsserver
: ${srcdir}/emacsserver.c ..
/src
/config.h
304 $(CC
) ${ALL_CFLAGS} ${srcdir}/emacsserver.c
$(LOADLIBES
) -o emacsserver
306 emacsclient
: ${srcdir}/emacsclient.c ..
/src
/config.h
307 $(CC
) ${ALL_CFLAGS} ${srcdir}/emacsclient.c
$(LOADLIBES
) -o emacsclient
309 hexl
: ${srcdir}/hexl.c
310 $(CC
) ${ALL_CFLAGS} ${srcdir}/hexl.c
$(LOADLIBES
) -o hexl
312 TIMEROBJS
=getdate.o timer.o
$(ALLOCA
)
313 getdate.o
: ${srcdir}/getdate.y ..
/src
/config.h
314 ${YACC} ${YFLAGS} ${srcdir}/getdate.y
315 $(CC
) $(CPP_CFLAGS
) -c y.tab.c
317 timer.o
: ${srcdir}/timer.c ..
/src
/config.h
318 $(CC
) -c
$(CPP_CFLAGS
) ${srcdir}/timer.c
320 $(CC
) $(LINK_CFLAGS
) ${TIMEROBJS} $(LOADLIBES
) -o timer
322 make-path
: ${srcdir}/make-path.c ..
/src
/config.h
323 $(CC
) $(ALL_CFLAGS
) ${srcdir}/make-path.c
-o make-path
325 /* These are NOT included in INSTALLABLES or UTILITIES.
326 See ..
/src
/Makefile.in.in.
*/
327 emacstool
: ${srcdir}/emacstool.c
328 $(CC
) ${srcdir}/emacstool.c
-o emacstool
${ALL_CFLAGS} \
329 -lsuntool
-lsunwindow
-lpixrect
$(LOADLIBES
)
331 /* For SUN Japanese Language Environment.
*/
332 nemacstool
: ${srcdir}/emacstool.c
333 $(CC
) -o nemacstool
-DJLE
${ALL_CFLAGS} ${srcdir}/emacstool.c \
334 -lsuntool
-lmle
-lsunwindow
-lpixrect
$(LOADLIBES
)
336 xvetool
: ${srcdir}/emacstool.c
337 $(CC
) -o xvetool
-DXVIEW
${ALL_CFLAGS} ${srcdir}/emacstool.c \
338 -lxview
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
341 xveterm
: ${srcdir}/emacstool.c
342 $(CC
) -o xveterm
-DXVIEW
-DTTERM
${ALL_CFLAGS} ${srcdir}/emacstool.c \
343 -lxview
-lolgx
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
346 aixcc
: ${srcdir}/aixcc.c
347 $(CC
) $(ALL_CFLAGS
) -o aixcc
${srcdir}/aixcc.c
349 aixcc.c
: ${srcdir}/aixcc.
lex
350 lex ${srcdir}/aixcc.
lex