comparison src/Makefile.in.in @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents cc15677e0335
children 064ab7fed2e0
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
29 29
30 ## For performance and consistency, no built-in rules. 30 ## For performance and consistency, no built-in rules.
31 .SUFFIXES: 31 .SUFFIXES:
32 .SUFFIXES: .c .h .o .i .s .dep 32 .SUFFIXES: .c .h .o .i .s .dep
33 33
34 #ifdef USE_GNU_MAKE
35 RECURSIVE_MAKE=$(MAKE)
36 #else
34 @SET_MAKE@ 37 @SET_MAKE@
38 RECURSIVE_MAKE=@RECURSIVE_MAKE@
39 #endif
40
35 SHELL=/bin/sh 41 SHELL=/bin/sh
36 RM = rm -f 42 RM = rm -f
37 43
38 lispdir = ${srcdir}/../lisp/ 44 lispdir = ${srcdir}/../lisp/
39 libsrc = ../lib-src/ 45 libsrc = ../lib-src/
42 ## Here are the things that we expect ../configure to edit. 48 ## Here are the things that we expect ../configure to edit.
43 prefix=@prefix@ 49 prefix=@prefix@
44 srcdir=@srcdir@ 50 srcdir=@srcdir@
45 blddir=@blddir@ 51 blddir=@blddir@
46 version=@version@ 52 version=@version@
47 CC=@CC@ 53 CC=@XEMACS_CC@
48 CPP=@CPP@ 54 CPP=@CPP@
49 CFLAGS=@CFLAGS@ 55 CFLAGS=@CFLAGS@
50 CPPFLAGS=@CPPFLAGS@ 56 CPPFLAGS=@CPPFLAGS@
51 LDFLAGS=@LDFLAGS@ 57 LDFLAGS=@LDFLAGS@
52 RECURSIVE_MAKE=@RECURSIVE_MAKE@
53 58
54 c_switch_all=@c_switch_all@ 59 c_switch_all=@c_switch_all@
55 ld_switch_all=@ld_switch_all@ 60 ld_switch_all=@ld_switch_all@
56 ld_libs_all=@ld_libs_all@ 61 ld_libs_all=@ld_libs_all@
57 ld_dynamic_link_flags=@ld_dynamic_link_flags@ 62 ld_dynamic_link_flags=@ld_dynamic_link_flags@
171 fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\ 176 fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\
172 frame.o general.o getloadavg.o glyphs.o glyphs-eimage.o\ 177 frame.o general.o getloadavg.o glyphs.o glyphs-eimage.o\
173 $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\ 178 $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\
174 keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\ 179 keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\
175 macros.o marker.o md5.o minibuf.o objects.o opaque.o\ 180 macros.o marker.o md5.o minibuf.o objects.o opaque.o\
176 print.o process.o profile.o pure.o\ 181 print.o process.o profile.o\
177 rangetab.o redisplay.o redisplay-output.o regex.o\ 182 rangetab.o redisplay.o redisplay-output.o regex.o\
178 search.o $(sheap_obj) signal.o sound.o\ 183 search.o $(sheap_obj) signal.o sound.o\
179 specifier.o strftime.o symbols.o syntax.o sysdep.o\ 184 specifier.o strftime.o symbols.o syntax.o sysdep.o\
180 undo.o $(x_objs) widget.o window.o 185 undo.o $(x_objs) widget.o window.o
181 186
290 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs) 295 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs)
291 #endif /* HAVE_X_WINDOWS */ 296 #endif /* HAVE_X_WINDOWS */
292 297
293 ## define otherobjs as list of object files that make-docfile 298 ## define otherobjs as list of object files that make-docfile
294 ## should not be told about. 299 ## should not be told about.
295 otherobjs = $(BTL_objs) lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs) 300 otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
296 otherrtls = $(otherobjs:.o=.c.rtl) 301 otherrtls = $(otherobjs:.o=.c.rtl)
297 othersrcs = $(otherobjs:.o=.c) 302 othersrcs = $(otherobjs:.o=.c)
298 303
299 LIBES = $(lwlib_libs) $(quantify_libs) $(malloclib) $(ld_libs_all) $(lib_gcc) 304 LIBES = $(lwlib_libs) $(malloclib) $(ld_libs_all) $(lib_gcc)
300 305
301 #ifdef I18N3 306 #ifdef I18N3
302 mo_dir = ${etcdir} 307 mo_dir = ${etcdir}
303 mo_file = ${mo_dir}emacs.mo 308 mo_file = ${mo_dir}emacs.mo
304 #endif 309 #endif
305 310
306 LOADPATH = EMACSBOOTSTRAPLOADPATH="${lispdir}:${blddir}" 311 LOADPATH = EMACSBOOTSTRAPLOADPATH="${lispdir}:${blddir}"
307 DUMPENV = $(LOADPATH) 312 DUMPENV = $(LOADPATH)
313 temacs_loadup = $(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el
314 dump_temacs = ${temacs_loadup} dump
315 run_temacs = ${temacs_loadup} run-temacs
308 316
309 release: temacs ${libsrc}DOC $(mo_file) ${other_files} 317 release: temacs ${libsrc}DOC $(mo_file) ${other_files}
310 #ifdef CANNOT_DUMP 318 #ifdef CANNOT_DUMP
311 ln temacs ${PROGNAME} 319 ln temacs ${PROGNAME}
312 #else 320 #else
330 touch release 338 touch release
331 #endif /* ! defined (CANNOT_DUMP) */ 339 #endif /* ! defined (CANNOT_DUMP) */
332 340
333 ${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp 341 ${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
334 @$(RM) $@ && touch SATISFIED 342 @$(RM) $@ && touch SATISFIED
335 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump 343 -${dump_temacs}
336 @if test -f $@; then if test -f SATISFIED; then \ 344 @if test -f $@; then if test -f SATISFIED; then \
337 echo "Testing for Lisp shadows ..."; \ 345 echo "Testing for Lisp shadows ..."; \
338 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \ 346 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
339 $(RM) SATISFIED; exit 0; fi; \ 347 $(RM) SATISFIED; exit 0; fi; \
340 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \ 348 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
341 $(RECURSIVE_MAKE) $@; 349 $(RECURSIVE_MAKE) $@;
342 350
343 fastdump: temacs 351 fastdump: temacs
344 @$(RM) ${PROGNAME} && touch SATISFIED 352 @$(RM) ${PROGNAME} && touch SATISFIED
345 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump 353 -${dumpp_temacs}
346 @if test -f ${PROGNAME}; then if test -f SATISFIED; then \ 354 @if test -f ${PROGNAME}; then if test -f SATISFIED; then \
347 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \ 355 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
348 $(RM) SATISFIED; exit 0; fi; \ 356 $(RM) SATISFIED; exit 0; fi; \
349 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; 357 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi;
350 358
351 FRC.update-elc.stamp : 359 FRC.update-elc.stamp :
439 $(LD) $(temacs_link_args) 447 $(LD) $(temacs_link_args)
440 448
441 .PHONY : run-temacs 449 .PHONY : run-temacs
442 450
443 run-temacs: temacs 451 run-temacs: temacs
444 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el run-temacs 452 -${run_temacs}
453
454 ## We have automated tests!!
455 testdir = ${srcdir}/../tests/automated
456 tests = \
457 ${testdir}/hash-table-tests.el \
458 ${testdir}/lisp-tests.el \
459 ${testdir}/database-tests.el \
460 ${testdir}/byte-compiler-tests.el
461 batch_test_emacs = -batch -l ${testdir}/test-harness.el -f batch-test-emacs ${tests}
462
463 .PHONY: check check-temacs
464 check:
465 ./${PROGNAME} ${batch_test_emacs}
466 check-temacs:
467 ${run_temacs} ${batch_test_emacs}
445 468
446 ## Debugging targets: 469 ## Debugging targets:
447 ## 470 ##
448 ## RTC is Sun WorkShop's Run Time Checking 471 ## None of the debugging products work with a dumped xemacs binary,
449 ## 472 ## because it does unexpected things like free memory that has been
450 ## Purify, Quantify, PureCoverage are software quality products from 473 ## malloc'ed in a *different* process!! So we need to run these on
451 ## Rational, formerly Pure Atria, formerly Pure Software. 474 ## temacs.
452 ## 475
453 ## None of these products work with a dumped xemacs binary, because it 476 ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx
454 ## does unexpected things like free memory that has been malloc'ed in
455 ## a *different* process!! So we need to run these on temacs.
456 ##
457
458 .PHONY : run-rtcmacs run-puremacs run-quantmacs
459
460 rtc_patch.o: 477 rtc_patch.o:
461 rtc_patch_area -o $@ 478 rtc_patch_area -o $@
462 479
463 rtcmacs: $(temacs_deps) rtc_patch.o 480 rtcmacs: $(temacs_deps) rtc_patch.o
464 $(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o 481 $(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o
465 mv temacs rtcmacs 482 mv temacs rtcmacs
466 483
484 .PHONY: run-rtcmacs
467 run-rtcmacs: rtcmacs 485 run-rtcmacs: rtcmacs
468 dbx -q -C -c \ 486 dbx -q -C -c \
469 'dbxenv rtc_error_log_file_name /dev/fd/1; \ 487 'dbxenv rtc_error_log_file_name /dev/fd/1; \
470 dbxenv suppress_startup_message 5.0; \ 488 dbxenv suppress_startup_message 5.0; \
471 ignore POLL; \ 489 ignore POLL; \
472 check -access; \ 490 check -access; \
473 suppress rui; \ 491 suppress rui; \
474 runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \ 492 runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \
475 run' rtcmacs 493 run' rtcmacs
476 494
495 ## Purify, Quantify, PureCoverage are software quality products from
496 ## Rational, formerly Pure Atria, formerly Pure Software.
497 ##
477 ## Purify 498 ## Purify
478 PURIFY_PROG=purify 499 PURIFY_PROG = purify
479 PURIFY_FLAGS=-chain-length=32 -ignore-signals=SIGPOLL -threads=yes \ 500 PURIFY_FLAGS = -chain-length=32 -ignore-signals=SIGPOLL -threads=yes \
480 -cache-dir=./purecache -always-use-cache-dir=yes -pointer-mask=0x0fffffff 501 -cache-dir=./purecache -always-use-cache-dir=yes -pointer-mask=0x0fffffff
502 PURIFY_LIBS = -lpthread
481 puremacs: $(temacs_deps) 503 puremacs: $(temacs_deps)
482 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) -lpthread 504 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
483 505 cp $@ temacs
484 run-puremacs: puremacs
485 -$(DUMPENV) ./puremacs -batch -l ${srcdir}/../lisp/loadup.el run-temacs
486 506
487 ## Quantify 507 ## Quantify
488 #ifdef QUANTIFY 508 #ifdef QUANTIFY
489 quantify_prog = quantify 509 QUANTIFY_PROG = quantify
490 quantify_flags = -windows=no -record-data=no 510 QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir`
491 quantify_includes = -I/local/include 511 QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes
492 quantify_libs = /local/lib/quantify_stubs.a 512 cppflags += -I$(QUANTIFY_HOME)
513 temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a
493 514
494 quantmacs: $(temacs_deps) 515 quantmacs: $(temacs_deps)
495 $(quantify_prog) $(quantify_flags) $(LD) $(temacs_link_args) 516 $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args)
517 cp $@ temacs
496 #endif /* QUANTIFY */ 518 #endif /* QUANTIFY */
519
497 520
498 PURECOV_PROG=purecov 521 PURECOV_PROG=purecov
499 covmacs: $(temacs_deps) 522 covmacs: $(temacs_deps)
500 $(PURECOV_PROG) $(LD) $(temacs_link_args) 523 $(PURECOV_PROG) $(LD) $(temacs_link_args)
501 524
646 mv allocax.o alloca.o 669 mv allocax.o alloca.o
647 $(RM) allocax.s allocatem.c 670 $(RM) allocax.s allocatem.c
648 #endif /* HAVE_ALLOCA */ 671 #endif /* HAVE_ALLOCA */
649 #endif /* ! defined (C_ALLOCA) */ 672 #endif /* ! defined (C_ALLOCA) */
650 673
651 #ifdef EMACS_BTL
652 BTL_includes = -I$(BTL_dir)
653 BTL_compile = -DEMACS_BTL -D`lucid-arch` -I. $(BTL_includes) $(BTL_dir)/$(@:.o=.c)
654
655 cadillac-btl.o cadillac-btl-process.o cadillac-btl-emacs.o:
656 $(CC) $(CFLAGS) -c $(BTL_compile)
657 cadillac-btl-asm.o:
658 $(CC) $(CFLAGS) -c $(BTL_compile)
659 #endif /* EMACS_BTL */
660
661 #ifdef HAVE_NATIVE_SOUND 674 #ifdef HAVE_NATIVE_SOUND
662 sunplay.o: ${srcdir}/sunplay.c 675 sunplay.o: ${srcdir}/sunplay.c
663 $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c 676 $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c
664 hpplay.o: ${srcdir}/hpplay.c 677 hpplay.o: ${srcdir}/hpplay.c
665 $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c 678 $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c
677 $(RM) libextcli* update-elc.stamp 690 $(RM) libextcli* update-elc.stamp
678 ## This is used in making a distribution. 691 ## This is used in making a distribution.
679 ## Do not use it on development directories! 692 ## Do not use it on development directories!
680 distclean: clean 693 distclean: clean
681 $(RM) config.h paths.h Emacs.ad.h \ 694 $(RM) config.h paths.h Emacs.ad.h \
682 Makefile Makefile.in TAGS ${PROGNAME}.* 695 Makefile Makefile.in GNUmakefile TAGS ${PROGNAME}.*
683 realclean: distclean 696 realclean: distclean
684 versionclean: 697 versionclean:
685 $(RM) ${PROGNAME} ${PROGNAME}.exe ${libsrc}DOC 698 $(RM) ${PROGNAME} ${PROGNAME}.exe ${libsrc}DOC
686 extraclean: realclean 699 extraclean: realclean
687 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#* 700 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
694 707
695 relock: 708 relock:
696 chmod -w $(SOURCES) 709 chmod -w $(SOURCES)
697 710
698 ## Dependency processing using home-grown script, not makedepend 711 ## Dependency processing using home-grown script, not makedepend
712 .PHONY: depend
713 FRC.depend:
699 depend: FRC.depend 714 depend: FRC.depend
700 $(RM) ${srcdir}/depend depend.tmp 715 cd ${srcdir} && $(RM) depend.tmp && \
701 perl ${srcdir}/make-src-depend > depend.tmp 716 perl make-src-depend > depend.tmp && \
702 mv depend.tmp ${srcdir}/depend 717 $(RM) depend && mv depend.tmp depend