1 |
# Makefile for lib-src subdirectory in GNU Emacs. |
# Makefile for lib-src subdirectory in GNU Emacs. |
2 |
# Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc. |
# Copyright (C) 1985, 1987, 1988, 1993, 1994, 2002, 2003 |
3 |
|
# Free Software Foundation, Inc. |
4 |
|
|
5 |
# This file is part of GNU Emacs. |
# This file is part of GNU Emacs. |
6 |
|
|
28 |
CC=@CC@ |
CC=@CC@ |
29 |
CFLAGS=@CFLAGS@ |
CFLAGS=@CFLAGS@ |
30 |
ALLOCA=@ALLOCA@ |
ALLOCA=@ALLOCA@ |
|
YACC=@YACC@ |
|
31 |
version=@version@ |
version=@version@ |
32 |
configuration=@configuration@ |
configuration=@configuration@ |
33 |
|
EXEEXT=@EXEEXT@ |
34 |
|
|
35 |
# Program name transformation. |
# Program name transformation. |
36 |
TRANSFORM = @program_transform_name@ |
TRANSFORM = @program_transform_name@ |
59 |
# --libexecdir option to `../configure'. |
# --libexecdir option to `../configure'. |
60 |
libexecdir=@libexecdir@ |
libexecdir=@libexecdir@ |
61 |
|
|
62 |
|
# Directory for local state files for all programs. |
63 |
|
localstatedir=@localstatedir@ |
64 |
|
|
65 |
# Where to find the source code. This is set by the configure |
# Where to find the source code. This is set by the configure |
66 |
# script's `--srcdir' option. However, the value of ${srcdir} in |
# script's `--srcdir' option. However, the value of ${srcdir} in |
67 |
# this makefile is not identical to what was specified with --srcdir, |
# this makefile is not identical to what was specified with --srcdir, |
102 |
|
|
103 |
# Things that a user might actually run, |
# Things that a user might actually run, |
104 |
# which should be installed in bindir. |
# which should be installed in bindir. |
105 |
INSTALLABLES = etags ctags emacsclient b2m ebrowse |
INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} b2m${EXEEXT} ebrowse${EXEEXT} |
106 |
INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog |
INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog |
107 |
|
|
108 |
# Things that Emacs runs internally, or during the build process, |
# Things that Emacs runs internally, or during the build process, |
109 |
# which should not be installed in bindir. |
# which should not be installed in bindir. |
110 |
UTILITIES= profile digest-doc sorted-doc movemail cvtmail fakemail \ |
UTILITIES= profile${EXEEXT} digest-doc${EXEEXT} sorted-doc${EXEEXT} movemail${EXEEXT} cvtmail${EXEEXT} fakemail${EXEEXT} \ |
111 |
yow emacsserver hexl update-game-score |
yow${EXEEXT} hexl${EXEEXT} update-game-score${EXEEXT} |
112 |
|
|
113 |
DONT_INSTALL= test-distrib make-docfile |
DONT_INSTALL= test-distrib${EXEEXT} make-docfile${EXEEXT} |
114 |
|
|
115 |
# Like UTILITIES, but they're not system-dependent, and should not be |
# Like UTILITIES, but they're not system-dependent, and should not be |
116 |
# deleted by the distclean target. |
# deleted by the distclean target. |
151 |
#undef alloca |
#undef alloca |
152 |
#endif |
#endif |
153 |
|
|
154 |
/* Some machines don't find the standard C libraries in the usual place. */ |
/* Some machines don\'t find the standard C libraries in the usual place. */ |
155 |
#ifndef ORDINARY_LINK |
#ifndef ORDINARY_LINK |
156 |
#ifndef LIB_STANDARD_LIBSRC |
#ifndef LIB_STANDARD_LIBSRC |
157 |
#define LIB_STANDARD_LIBSRC -lc |
#define LIB_STANDARD_LIBSRC -lc |
252 |
-I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} |
-I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} |
253 |
/* This was all of CPP_CFLAGS except -Demacs. |
/* This was all of CPP_CFLAGS except -Demacs. |
254 |
Now that -Demacs has been deleted from CPP_CFLAGS, |
Now that -Demacs has been deleted from CPP_CFLAGS, |
255 |
this is actually the same as CPP_CFLAGS, but let's not delete it yet. */ |
this is actually the same as CPP_CFLAGS, but let\'s not delete it yet. */ |
256 |
BASE_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ |
BASE_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ |
257 |
-I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} |
-I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} |
258 |
|
|
263 |
.c.o: |
.c.o: |
264 |
${CC} -c ${CPP_CFLAGS} $< |
${CC} -c ${CPP_CFLAGS} $< |
265 |
|
|
266 |
all: ${DONT_INSTALL} ${UTILITIES} ${INSTALLABLES} |
all: ${DONT_INSTALL} ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} |
267 |
|
|
268 |
|
/* These targets copy the scripts into the build directory |
269 |
|
so that they can be run from there in an uninstalled Emacs. */ |
270 |
|
rcs2log: $(srcdir)/rcs2log |
271 |
|
cp -p $(srcdir)/rcs2log rcs2log |
272 |
|
|
273 |
|
rcs-checkin: $(srcdir)/rcs-checkin |
274 |
|
cp -p $(srcdir)/rcs-checkin rcs-checkin |
275 |
|
|
276 |
|
grep-changelog: $(srcdir)/grep-changelog |
277 |
|
cp -p $(srcdir)/grep-changelog grep-changelog |
278 |
|
|
279 |
|
vcdiff: $(srcdir)/vcdiff |
280 |
|
cp -p $(srcdir)/vcdiff vcdiff |
281 |
|
|
282 |
#ifdef MOVEMAIL_NEEDS_BLESSING |
#ifdef MOVEMAIL_NEEDS_BLESSING |
283 |
blessmail: |
blessmail: |
287 |
|
|
288 |
maybe-blessmail: BLESSMAIL |
maybe-blessmail: BLESSMAIL |
289 |
#ifdef MOVEMAIL_NEEDS_BLESSING |
#ifdef MOVEMAIL_NEEDS_BLESSING |
290 |
/* Don't charge ahead and do it! Let the installer decide. |
/* Don\'t charge ahead and do it! Let the installer decide. |
291 |
./blessmail ${archlibdir}/movemail */ |
./blessmail ${archlibdir}/movemail${EXEEXT} */ |
292 |
@if [ `wc -l <blessmail` != 2 ] ; then \ |
@if [ `wc -l <blessmail` != 2 ] ; then \ |
293 |
dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \ |
dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \ |
294 |
echo Assuming $$dir is really the mail spool directory, you should; \ |
echo Assuming $$dir is really the mail spool directory, you should; \ |
295 |
echo run lib-src/blessmail ${archlibdir}/movemail; \ |
echo run lib-src/blessmail ${archlibdir}/movemail${EXEEXT}; \ |
296 |
echo as root, to give movemail appropriate permissions.; \ |
echo as root, to give movemail${EXEEXT} appropriate permissions.; \ |
297 |
echo Do that after running make install.; \ |
echo Do that after running make install.; \ |
298 |
fi |
fi |
299 |
#endif |
#endif |
309 |
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file ${archlibdir}/$$file ; \ |
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file ${archlibdir}/$$file ; \ |
310 |
done ; \ |
done ; \ |
311 |
fi |
fi |
312 |
|
$(top_srcdir)/mkinstalldirs ${gamedir} |
313 |
|
touch ${gamedir}/snake-scores |
314 |
|
touch ${gamedir}/tetris-scores |
315 |
/* If the following commands fail, that is not a big deal. |
/* If the following commands fail, that is not a big deal. |
316 |
update-game-score will detect at runtime that it is not setuid, |
update-game-score will detect at runtime that it is not setuid, |
317 |
and handle things accordingly. */ |
and handle things accordingly. */ |
318 |
if test ${gamedir} != no && chown ${gameuser} ${archlibdir}/update-game-score && chmod u+s ${archlibdir}/update-game-score; then \ |
-if chown ${gameuser} ${archlibdir}/update-game-score && chmod u+s ${archlibdir}/update-game-score; then \ |
|
$(top_srcdir)/mkinstalldirs ${gamedir}; \ |
|
319 |
chown ${gameuser} ${gamedir}; \ |
chown ${gameuser} ${gamedir}; \ |
320 |
chmod u=rwx,g=rwx,o=rx ${gamedir}; \ |
chmod u=rwx,g=rwx,o=rx ${gamedir}; \ |
|
touch ${gamedir}/snake-scores; \ |
|
|
touch ${gamedir}/tetris-scores; \ |
|
321 |
fi |
fi |
322 |
if [ `(cd ${archlibdir} && /bin/pwd)` \ |
if [ `(cd ${archlibdir} && /bin/pwd)` \ |
323 |
!= `(cd ${srcdir} && /bin/pwd)` ]; then \ |
!= `(cd ${srcdir} && /bin/pwd)` ]; then \ |
374 |
@echo "We don't have any tests for GNU Emacs yet." |
@echo "We don't have any tests for GNU Emacs yet." |
375 |
|
|
376 |
tags: TAGS |
tags: TAGS |
377 |
TAGS: etags |
TAGS: etags${EXEEXT} |
378 |
etags *.[ch] |
etags *.[ch] |
379 |
|
|
380 |
/* This verifies that the non-ASCII characters in the file `testfile' |
/* This verifies that the non-ASCII characters in the file \`testfile\' |
381 |
have not been clobbered by whatever means were used to copy and |
have not been clobbered by whatever means were used to copy and |
382 |
distribute Emacs. If they were clobbered, all the .elc files were |
distribute Emacs. If they were clobbered, all the .elc files were |
383 |
clobbered too. */ |
clobbered too. */ |
384 |
test-distrib: ${srcdir}/test-distrib.c |
test-distrib${EXEEXT}: ${srcdir}/test-distrib.c |
385 |
$(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c |
$(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c |
386 |
./test-distrib ${srcdir}/testfile |
./test-distrib ${srcdir}/testfile |
387 |
|
|
405 |
regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h |
regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h |
406 |
${CC} -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c |
${CC} -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c |
407 |
|
|
408 |
etags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h |
etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h |
409 |
$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags |
$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags |
410 |
|
|
411 |
ebrowse: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h |
ebrowse${EXEEXT}: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h |
412 |
$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse |
$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse |
413 |
|
|
414 |
/* We depend on etags to assure that parallel makes don't write two |
/* We depend on etags to assure that parallel makes don\'t write two |
415 |
etags.o files on top of each other. */ |
etags.o files on top of each other. */ |
416 |
ctags: etags |
ctags${EXEEXT}: etags${EXEEXT} |
417 |
$(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags |
$(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags |
418 |
|
|
419 |
profile: ${srcdir}/profile.c ../src/config.h |
profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h |
420 |
$(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile |
$(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile |
421 |
|
|
422 |
make-docfile: ${srcdir}/make-docfile.c ../src/config.h |
make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h |
423 |
$(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile |
$(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile |
424 |
|
|
425 |
digest-doc: ${srcdir}/digest-doc.c |
digest-doc${EXEEXT}: ${srcdir}/digest-doc.c |
426 |
$(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc |
$(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc |
427 |
|
|
428 |
sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA} |
sorted-doc${EXEEXT}: ${srcdir}/sorted-doc.c ${ALLOCA} |
429 |
$(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc |
$(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc |
430 |
|
|
431 |
b2m: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS) |
b2m${EXEEXT}: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS) |
432 |
$(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c -DVERSION="\"${version}\"" \ |
$(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c -DVERSION="\"${version}\"" \ |
433 |
$(GETOPTOBJS) $(LOADLIBES) -o b2m |
$(GETOPTOBJS) $(LOADLIBES) -o b2m |
434 |
|
|
435 |
movemail: movemail.o pop.o $(GETOPTDEPS) |
movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) |
436 |
$(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MAIL) $(LIBS_MOVE) -o movemail |
$(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MAIL) $(LIBS_MOVE) -o movemail |
437 |
|
|
438 |
movemail.o: ${srcdir}/movemail.c ../src/config.h |
movemail.o: ${srcdir}/movemail.c ../src/config.h |
441 |
pop.o: ${srcdir}/pop.c ../src/config.h |
pop.o: ${srcdir}/pop.c ../src/config.h |
442 |
$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c |
$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c |
443 |
|
|
444 |
cvtmail: ${srcdir}/cvtmail.c |
cvtmail${EXEEXT}: ${srcdir}/cvtmail.c |
445 |
$(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail |
$(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail |
446 |
|
|
447 |
fakemail: ${srcdir}/fakemail.c ../src/config.h |
fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h |
448 |
$(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail |
$(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail |
449 |
|
|
450 |
yow: ${srcdir}/yow.c ../src/epaths.h |
yow${EXEEXT}: ${srcdir}/yow.c ../src/epaths.h |
451 |
$(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow |
$(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow |
452 |
|
|
453 |
emacsserver: ${srcdir}/emacsserver.c ../src/config.h |
emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS) |
|
$(CC) ${ALL_CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver |
|
|
|
|
|
emacsclient: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS) |
|
454 |
$(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \ |
$(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \ |
455 |
-DVERSION=`sed -n -e '/(defconst emacs-version/ s/^[^"]*\("[^"]*"\).*/\1/p' ${srcdir}/../lisp/version.el` \ |
-DVERSION=`sed -n -e '/(defconst emacs-version/ s/^[^"]*\("[^"]*"\).*/\1/p' ${srcdir}/../lisp/version.el` \ |
456 |
$(LOADLIBES) -o emacsclient |
$(LOADLIBES) -o emacsclient |
457 |
|
|
458 |
hexl: ${srcdir}/hexl.c ../src/config.h |
hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h |
459 |
$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl |
$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl |
460 |
|
|
461 |
update-game-score: ${srcdir}/update-game-score.c ../src/config.h |
update-game-score${EXEEXT}: ${srcdir}/update-game-score.c ../src/config.h |
462 |
$(CC) ${ALL_CFLAGS} ${srcdir}/update-game-score.c $(LOADLIBES) -o update-game-score |
$(CC) ${ALL_CFLAGS} ${srcdir}/update-game-score.c \ |
463 |
|
-DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ |
464 |
|
$(LOADLIBES) -o update-game-score |
465 |
|
|
466 |
/* These are NOT included in INSTALLABLES or UTILITIES. |
/* These are NOT included in INSTALLABLES or UTILITIES. |
467 |
See ../src/Makefile.in. */ |
See ../src/Makefile.in. */ |
468 |
emacstool: ${srcdir}/emacstool.c |
emacstool${EXEEXT}: ${srcdir}/emacstool.c |
469 |
$(CC) ${srcdir}/emacstool.c -o emacstool ${ALL_CFLAGS} \ |
$(CC) ${srcdir}/emacstool.c -o emacstool ${ALL_CFLAGS} \ |
470 |
-lsuntool -lsunwindow -lpixrect $(LOADLIBES) |
-lsuntool -lsunwindow -lpixrect $(LOADLIBES) |
471 |
|
|
472 |
/* For SUN Japanese Language Environment. */ |
/* For SUN Japanese Language Environment. */ |
473 |
nemacstool: ${srcdir}/emacstool.c |
nemacstool${EXEEXT}: ${srcdir}/emacstool.c |
474 |
$(CC) -o nemacstool -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c \ |
$(CC) -o nemacstool -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c \ |
475 |
-lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES) |
-lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES) |
476 |
|
|
477 |
xvetool: ${srcdir}/emacstool.c |
xvetool${EXEEXT}: ${srcdir}/emacstool.c |
478 |
$(CC) -o xvetool -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c \ |
$(CC) -o xvetool -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c \ |
479 |
-lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ |
-lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ |
480 |
$(LOADLIBES) |
$(LOADLIBES) |
481 |
|
|
482 |
xveterm: ${srcdir}/emacstool.c |
xveterm${EXEEXT}: ${srcdir}/emacstool.c |
483 |
$(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \ |
$(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \ |
484 |
-lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ |
-lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ |
485 |
$(LOADLIBES) |
$(LOADLIBES) |