diff options
| author | Jan Djärv | 2004-11-09 08:19:51 +0000 |
|---|---|---|
| committer | Jan Djärv | 2004-11-09 08:19:51 +0000 |
| commit | d87a9ab8930c5460b3ca510083679351c4178a7c (patch) | |
| tree | bbf8f159717e137eb7326508b8a9e2654a128617 /src | |
| parent | 3cf5c99434b1d0daa23bdcebf53102299080b351 (diff) | |
| download | emacs-d87a9ab8930c5460b3ca510083679351c4178a7c.tar.gz emacs-d87a9ab8930c5460b3ca510083679351c4178a7c.zip | |
* doc.c: New variable Vbuild_files.
(Fsnarf_documentation): If Vbuild_files is nil, populate it with
file names from buildobh.lst. Only attach docstrings from files
that are in Vbuild_files.
(syms_of_doc): Defvar Vbuild_files.
* Makefile.in (SOME_MACHINE_OBJECTS): Add fringe.o, image.o
and w32*.o.
(temacs${EXEEXT}): Generate buildobj.lst when temacs is linked.
(mostlyclean): rm buildobj.lst
* makefile.w32-in ($(TEMACS)): Generate buildobj.lst when temacs
is linked.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 16 | ||||
| -rw-r--r-- | src/Makefile.in | 8 | ||||
| -rw-r--r-- | src/doc.c | 76 | ||||
| -rw-r--r-- | src/makefile.w32-in | 3 |
4 files changed, 100 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3958f9a1153..1c413d20c5b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2004-11-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * doc.c: New variable Vbuild_files. | ||
| 4 | (Fsnarf_documentation): If Vbuild_files is nil, populate it with | ||
| 5 | file names from buildobh.lst. Only attach docstrings from files | ||
| 6 | that are in Vbuild_files. | ||
| 7 | (syms_of_doc): Defvar Vbuild_files. | ||
| 8 | |||
| 9 | * Makefile.in (SOME_MACHINE_OBJECTS): Add fringe.o, image.o | ||
| 10 | and w32*.o. | ||
| 11 | (temacs${EXEEXT}): Generate buildobj.lst when temacs is linked. | ||
| 12 | (mostlyclean): rm buildobj.lst | ||
| 13 | |||
| 14 | * makefile.w32-in ($(TEMACS)): Generate buildobj.lst when temacs | ||
| 15 | is linked. | ||
| 16 | |||
| 1 | 2004-11-09 Kim F. Storm <storm@cua.dk> | 17 | 2004-11-09 Kim F. Storm <storm@cua.dk> |
| 2 | 18 | ||
| 3 | * fringe.c (update_window_fringes): Update fringe bitmaps if | 19 | * fringe.c (update_window_fringes): Update fringe bitmaps if |
diff --git a/src/Makefile.in b/src/Makefile.in index 758e74ebf64..48952f674bb 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -596,8 +596,10 @@ obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \ | |||
| 596 | These go in the DOC file on all machines | 596 | These go in the DOC file on all machines |
| 597 | in case they are needed there. */ | 597 | in case they are needed there. */ |
| 598 | SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \ | 598 | SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \ |
| 599 | xterm.o xfns.o xmenu.o xselect.o xrdb.o \ | 599 | xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \ |
| 600 | mac.o macterm.o macfns.o macmenu.o fontset.o | 600 | mac.o macterm.o macfns.o macmenu.o fontset.o \ |
| 601 | w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o \ | ||
| 602 | w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o | ||
| 601 | 603 | ||
| 602 | 604 | ||
| 603 | #ifdef TERMINFO | 605 | #ifdef TERMINFO |
| @@ -944,6 +946,7 @@ ${libsrc}make-docfile${EXEEXT}: | |||
| 944 | #endif | 946 | #endif |
| 945 | 947 | ||
| 946 | temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} | 948 | temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} |
| 949 | echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst | ||
| 947 | $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ | 950 | $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ |
| 948 | -o temacs ${STARTFILES} ${obj} ${otherobj} \ | 951 | -o temacs ${STARTFILES} ${obj} ${otherobj} \ |
| 949 | OBJECTS_MACHINE ${LIBES} | 952 | OBJECTS_MACHINE ${LIBES} |
| @@ -1272,6 +1275,7 @@ mostlyclean: | |||
| 1272 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a | 1275 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a |
| 1273 | rm -f ../etc/DOC | 1276 | rm -f ../etc/DOC |
| 1274 | rm -f bootstrap-emacs${EXEEXT} | 1277 | rm -f bootstrap-emacs${EXEEXT} |
| 1278 | rm -f buildobj.lst | ||
| 1275 | clean: mostlyclean | 1279 | clean: mostlyclean |
| 1276 | rm -f emacs-*${EXEEXT} emacs${EXEEXT} | 1280 | rm -f emacs-*${EXEEXT} emacs${EXEEXT} |
| 1277 | /**/# This is used in making a distribution. | 1281 | /**/# This is used in making a distribution. |
| @@ -51,6 +51,9 @@ Lisp_Object Vdoc_file_name; | |||
| 51 | 51 | ||
| 52 | Lisp_Object Qfunction_documentation; | 52 | Lisp_Object Qfunction_documentation; |
| 53 | 53 | ||
| 54 | /* A list of files used to build this Emacs binary. */ | ||
| 55 | static Lisp_Object Vbuild_files; | ||
| 56 | |||
| 54 | extern Lisp_Object Voverriding_local_map; | 57 | extern Lisp_Object Voverriding_local_map; |
| 55 | 58 | ||
| 56 | /* For VMS versions with limited file name syntax, | 59 | /* For VMS versions with limited file name syntax, |
| @@ -581,6 +584,7 @@ the same file name is found in the `doc-directory'. */) | |||
| 581 | register char *p, *end; | 584 | register char *p, *end; |
| 582 | Lisp_Object sym; | 585 | Lisp_Object sym; |
| 583 | char *name; | 586 | char *name; |
| 587 | int skip_file = 0; | ||
| 584 | 588 | ||
| 585 | CHECK_STRING (filename); | 589 | CHECK_STRING (filename); |
| 586 | 590 | ||
| @@ -618,6 +622,54 @@ the same file name is found in the `doc-directory'. */) | |||
| 618 | #endif /* VMS4_4 */ | 622 | #endif /* VMS4_4 */ |
| 619 | #endif /* VMS */ | 623 | #endif /* VMS */ |
| 620 | 624 | ||
| 625 | /* Vbuild_files is nil when temacs is run, and non-nil after that. */ | ||
| 626 | if (NILP (Vbuild_files)) | ||
| 627 | { | ||
| 628 | size_t cp_size = 0; | ||
| 629 | size_t to_read; | ||
| 630 | int nr_read; | ||
| 631 | char *cp = NULL; | ||
| 632 | char *beg, *end; | ||
| 633 | |||
| 634 | fd = emacs_open ("buildobj.lst", O_RDONLY, 0); | ||
| 635 | if (fd < 0) | ||
| 636 | report_file_error ("Opening file buildobj.lst", Qnil); | ||
| 637 | |||
| 638 | filled = 0; | ||
| 639 | for (;;) | ||
| 640 | { | ||
| 641 | cp_size += 1024; | ||
| 642 | to_read = cp_size - 1 - filled; | ||
| 643 | cp = xrealloc (cp, cp_size); | ||
| 644 | nr_read = emacs_read (fd, &cp[filled], to_read); | ||
| 645 | filled += nr_read; | ||
| 646 | if (nr_read < to_read) | ||
| 647 | break; | ||
| 648 | } | ||
| 649 | |||
| 650 | emacs_close (fd); | ||
| 651 | cp[filled] = 0; | ||
| 652 | |||
| 653 | for (beg = cp; *beg; beg = end) | ||
| 654 | { | ||
| 655 | int len; | ||
| 656 | |||
| 657 | while (*beg && isspace (*beg)) ++beg; | ||
| 658 | |||
| 659 | for (end = beg; *end && ! isspace (*end); ++end) | ||
| 660 | if (*end == '/') beg = end+1; /* skip directory part */ | ||
| 661 | |||
| 662 | len = end - beg; | ||
| 663 | if (len > 4 && end[-4] == '.' && end[-3] == 'o') | ||
| 664 | len -= 2; /* Just take .o if it ends in .obj */ | ||
| 665 | |||
| 666 | if (len > 0) | ||
| 667 | Vbuild_files = Fcons (make_string (beg, len), Vbuild_files); | ||
| 668 | } | ||
| 669 | |||
| 670 | xfree (cp); | ||
| 671 | } | ||
| 672 | |||
| 621 | fd = emacs_open (name, O_RDONLY, 0); | 673 | fd = emacs_open (name, O_RDONLY, 0); |
| 622 | if (fd < 0) | 674 | if (fd < 0) |
| 623 | report_file_error ("Opening doc string file", | 675 | report_file_error ("Opening doc string file", |
| @@ -640,10 +692,28 @@ the same file name is found in the `doc-directory'. */) | |||
| 640 | if (p != end) | 692 | if (p != end) |
| 641 | { | 693 | { |
| 642 | end = (char *) index (p, '\n'); | 694 | end = (char *) index (p, '\n'); |
| 695 | |||
| 696 | /* See if this is a file name, and if it is a file in build-files. */ | ||
| 697 | if (p[1] == 'S' && end - p > 4 && end[-2] == '.' | ||
| 698 | && (end[-1] == 'o' || end[-1] == 'c')) | ||
| 699 | { | ||
| 700 | int len = end - p - 2; | ||
| 701 | char *fromfile = alloca (len + 1); | ||
| 702 | strncpy (fromfile, &p[2], len); | ||
| 703 | fromfile[len] = 0; | ||
| 704 | if (fromfile[len-1] == 'c') | ||
| 705 | fromfile[len-1] = 'o'; | ||
| 706 | |||
| 707 | if (EQ (Fmember (build_string (fromfile), Vbuild_files), Qnil)) | ||
| 708 | skip_file = 1; | ||
| 709 | else | ||
| 710 | skip_file = 0; | ||
| 711 | } | ||
| 712 | |||
| 643 | sym = oblookup (Vobarray, p + 2, | 713 | sym = oblookup (Vobarray, p + 2, |
| 644 | multibyte_chars_in_text (p + 2, end - p - 2), | 714 | multibyte_chars_in_text (p + 2, end - p - 2), |
| 645 | end - p - 2); | 715 | end - p - 2); |
| 646 | if (SYMBOLP (sym)) | 716 | if (! skip_file && SYMBOLP (sym)) |
| 647 | { | 717 | { |
| 648 | /* Attach a docstring to a variable? */ | 718 | /* Attach a docstring to a variable? */ |
| 649 | if (p[1] == 'V') | 719 | if (p[1] == 'V') |
| @@ -919,6 +989,10 @@ syms_of_doc () | |||
| 919 | doc: /* Name of file containing documentation strings of built-in symbols. */); | 989 | doc: /* Name of file containing documentation strings of built-in symbols. */); |
| 920 | Vdoc_file_name = Qnil; | 990 | Vdoc_file_name = Qnil; |
| 921 | 991 | ||
| 992 | DEFVAR_LISP ("build-files", &Vbuild_files, | ||
| 993 | doc: /* A list of files used to build this Emacs binary. */); | ||
| 994 | Vbuild_files = Qnil; | ||
| 995 | |||
| 922 | defsubr (&Sdocumentation); | 996 | defsubr (&Sdocumentation); |
| 923 | defsubr (&Sdocumentation_property); | 997 | defsubr (&Sdocumentation_property); |
| 924 | defsubr (&Ssnarf_documentation); | 998 | defsubr (&Ssnarf_documentation); |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index a7efcc4cae5..5a232e28362 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -168,6 +168,9 @@ temacs: $(BLD) $(TEMACS) | |||
| 168 | $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) | 168 | $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) |
| 169 | $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) | 169 | $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) |
| 170 | "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 16 | 170 | "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 16 |
| 171 | echo $(OBJ0) > $(BLD)/buildobj.lst | ||
| 172 | echo $(OBJ1) >> $(BLD)/buildobj.lst | ||
| 173 | echo $(WIN32OBJ) >> $(BLD)/buildobj.lst | ||
| 171 | 174 | ||
| 172 | bootstrap: bootstrap-emacs | 175 | bootstrap: bootstrap-emacs |
| 173 | 176 | ||