Mercurial > hg > xemacs-beta
comparison src/Makefile.in.in @ 2015:2364237fbc0f
[xemacs-hg @ 2004-04-15 20:56:17 by olivierg]
Moving the dump file inside the executable
author | olivierg |
---|---|
date | Thu, 15 Apr 2004 20:56:23 +0000 |
parents | 9c872f33ecbe |
children | 71477bc21fe8 |
comparison
equal
deleted
inserted
replaced
2014:92f7301e4a23 | 2015:2364237fbc0f |
---|---|
415 | 415 |
416 #ifdef PDUMP | 416 #ifdef PDUMP |
417 DUMP_TARGET = $(PROGNAME).dmp | 417 DUMP_TARGET = $(PROGNAME).dmp |
418 RAW_EXE = $(PROGNAME) | 418 RAW_EXE = $(PROGNAME) |
419 DUMP_ID = dump-id.o | 419 DUMP_ID = dump-id.o |
420 #ifndef WIN32_NATIVE | |
421 DUMP_TARGET = $(PROGNAME) | |
422 RAW_EXE = temacs | |
423 #endif | |
420 #else | 424 #else |
421 DUMP_TARGET = $(PROGNAME) | 425 DUMP_TARGET = $(PROGNAME) |
422 RAW_EXE = temacs | 426 RAW_EXE = temacs |
423 #endif | 427 #endif |
424 | 428 |
534 dump-id.c: $(LIB_SRC)/make-dump-id $(link_deps) | 538 dump-id.c: $(LIB_SRC)/make-dump-id $(link_deps) |
535 $(LIB_SRC)/make-dump-id | 539 $(LIB_SRC)/make-dump-id |
536 | 540 |
537 ## (2) Link the XEmacs executable | 541 ## (2) Link the XEmacs executable |
538 | 542 |
539 temacs_deps = $(link_deps) $(DUMP_ID) | 543 #if !defined(PDUMP) || defined(WIN32_NATIVE) |
540 | 544 $(RAW_EXE): $(link_deps) $(DUMP_ID) |
541 temacs_link_args = \ | 545 $(LD) $(start_flags) $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) $(LIBES) |
542 $(start_flags) $(ldflags) \ | 546 #else |
543 -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) $(LIBES) | 547 $(RAW_EXE): $(link_deps) $(DUMP_ID) |
544 | 548 if test -f dump-size ; then \ |
545 $(RAW_EXE): $(temacs_deps) | 549 $(CC) -c $(cflags) -DMAX_SIZE=`cat dump-size` $(SRC)/dump-data.c ;\ |
546 $(LD) $(temacs_link_args) | 550 else \ |
551 $(CC) -c $(cflags) -DMAX_SIZE=0 $(SRC)/dump-data.c ;\ | |
552 fi | |
553 $(LD) $(start_flags) $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) dump-data.o $(LIBES) | |
554 #endif | |
547 | 555 |
548 ## (3) Update the .elc's needed for dumping | 556 ## (3) Update the .elc's needed for dumping |
549 | 557 |
550 .PHONY: FRC.needtodump | 558 .PHONY: FRC.needtodump |
551 FRC.needtodump: | 559 FRC.needtodump: |
583 @if test -f SATISFIED; then $(RM) SATISFIED; else $(RM) $@; \ | 591 @if test -f SATISFIED; then $(RM) SATISFIED; else $(RM) $@; \ |
584 $(RECURSIVE_MAKE) $@; fi | 592 $(RECURSIVE_MAKE) $@; fi |
585 #else | 593 #else |
586 @$(RM) $@ | 594 @$(RM) $@ |
587 $(dump_temacs) | 595 $(dump_temacs) |
596 #endif | |
597 #if defined(PDUMP) && !defined(WIN32_NATIVE) | |
598 if test -f dump-size; then \ | |
599 $(LIB_SRC)/insert-data-in-exec $(RAW_EXE) $(DUMP_TARGET).dmp $(DUMP_TARGET) `$(DO_TEMACS) -si`; \ | |
600 ret=$$? ; \ | |
601 if test $${ret} -eq 2; then \ | |
602 $(RM) dump-size ; \ | |
603 else \ | |
604 if test $${ret} -eq 1; then \ | |
605 exit 1; \ | |
606 else \ | |
607 chmod +x $(DUMP_TARGET) ; \ | |
608 fi ; \ | |
609 fi ; \ | |
610 fi | |
611 if ! test -f dump-size; then \ | |
612 $(LIB_SRC)/insert-data-in-exec -s $(DUMP_TARGET).dmp > dump-size ; \ | |
613 $(RM) dump-data.o $(DUMP_TARGET) $(DUMP_TARGET).dmp $(RAW_EXE);\ | |
614 $(RECURSIVE_MAKE) $@; \ | |
615 fi | |
588 #endif | 616 #endif |
589 | 617 |
590 ## (6) Update the remaining .elc's, post-dumping | 618 ## (6) Update the remaining .elc's, post-dumping |
591 | 619 |
592 .PHONY: update-elc-2 | 620 .PHONY: update-elc-2 |