aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn2009-08-26 08:28:23 +0000
committerKen Raeburn2009-08-26 08:28:23 +0000
commit878bde492768ea1e0dca48391d1612766f552730 (patch)
treeff185745acb66c13c2d3729c881f775f626aa52c /src
parentdc81064982de88b01b14fc200067a9f50522934e (diff)
downloademacs-878bde492768ea1e0dca48391d1612766f552730.tar.gz
emacs-878bde492768ea1e0dca48391d1612766f552730.zip
* Makefile.in (buildobj.h): New target.
(doc.o): Depend on it. (temacs${EXEEXT}): Don't generate buildobj.lst. (mostlyclean): Delete buildobj.h, not buildobj.lst. * makefile.w32-in ($(SRC)/buildobj.h): New target. ($(BLD)/doc.$(O)): Depend on it. (make-buildobj-CMD, make-buildobj-SH): New targets. (Syntax help provided by Eli Zaretskii.) ($(TEMACS)): Don't generate buildobj.lst. * doc.c: Include buildobj.h. (buildobj): New static variable. (Fsnarf_documentation): Use it, instead of opening and reading buildobj.lst.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog16
-rw-r--r--src/Makefile.in9
-rw-r--r--src/doc.c31
-rw-r--r--src/makefile.w32-in23
4 files changed, 45 insertions, 34 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index cff1f7a6431..3377e833138 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12009-08-26 Ken Raeburn <raeburn@raeburn.org>
2
3 * Makefile.in (buildobj.h): New target.
4 (doc.o): Depend on it.
5 (temacs${EXEEXT}): Don't generate buildobj.lst.
6 (mostlyclean): Delete buildobj.h, not buildobj.lst.
7 * makefile.w32-in ($(SRC)/buildobj.h): New target.
8 ($(BLD)/doc.$(O)): Depend on it.
9 (make-buildobj-CMD, make-buildobj-SH): New targets. (Syntax help
10 provided by Eli Zaretskii.)
11 ($(TEMACS)): Don't generate buildobj.lst.
12 * doc.c: Include buildobj.h.
13 (buildobj): New static variable.
14 (Fsnarf_documentation): Use it, instead of opening and reading
15 buildobj.lst.
16
12009-08-25 Michael Albinus <michael.albinus@gmx.de> 172009-08-25 Michael Albinus <michael.albinus@gmx.de>
2 18
3 * dbusbind.c (Fdbus_call_method) 19 * dbusbind.c (Fdbus_call_method)
diff --git a/src/Makefile.in b/src/Makefile.in
index 567bff9acea..fa2457c73a8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -938,8 +938,10 @@ ${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${lisp} ${SOME_MACHINE_LISP}
938${libsrc}make-docfile${EXEEXT}: 938${libsrc}make-docfile${EXEEXT}:
939 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT} 939 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT}
940 940
941buildobj.h: Makefile
942 echo "#define BUILDOBJ \"${obj} ${otherobj} " OBJECTS_MACHINE "\"" > buildobj.h
943
941temacs${EXEEXT}: $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} 944temacs${EXEEXT}: $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT}
942 echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst
943#ifdef NS_IMPL_GNUSTEP 945#ifdef NS_IMPL_GNUSTEP
944 $(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \ 946 $(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
945 -L@GNUSTEP_SYSTEM_LIBRARIES@ -lgnustep-gui -lgnustep-base \ 947 -L@GNUSTEP_SYSTEM_LIBRARIES@ -lgnustep-gui -lgnustep-base \
@@ -1064,7 +1066,8 @@ dispnew.o: dispnew.c systime.h commands.h process.h frame.h \
1064 disptab.h indent.h $(INTERVALS_H) \ 1066 disptab.h indent.h $(INTERVALS_H) \
1065 xterm.h blockinput.h atimer.h character.h msdos.h composite.h keyboard.h \ 1067 xterm.h blockinput.h atimer.h character.h msdos.h composite.h keyboard.h \
1066 syssignal.h $(config_h) 1068 syssignal.h $(config_h)
1067doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h keymap.h character.h 1069doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h keymap.h character.h \
1070 buildobj.h
1068doprnt.o: doprnt.c character.h $(config_h) 1071doprnt.o: doprnt.c character.h $(config_h)
1069dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ 1072dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \
1070 msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \ 1073 msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \
@@ -1284,7 +1287,7 @@ mostlyclean:
1284 rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a 1287 rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
1285 rm -f ../etc/DOC 1288 rm -f ../etc/DOC
1286 rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} 1289 rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
1287 rm -f buildobj.lst 1290 rm -f buildobj.h
1288clean: mostlyclean 1291clean: mostlyclean
1289 rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT} 1292 rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
1290#ifdef HAVE_NS 1293#ifdef HAVE_NS
diff --git a/src/doc.c b/src/doc.c
index c74085e7b6c..6d5862ce292 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -42,6 +42,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
42#include "keyboard.h" 42#include "keyboard.h"
43#include "character.h" 43#include "character.h"
44#include "keymap.h" 44#include "keymap.h"
45#include "buildobj.h"
45 46
46#ifdef HAVE_INDEX 47#ifdef HAVE_INDEX
47extern char *index P_ ((const char *, int)); 48extern char *index P_ ((const char *, int));
@@ -552,6 +553,7 @@ store_function_docstring (fun, offset)
552 } 553 }
553} 554}
554 555
556static const char buildobj[] = BUILDOBJ;
555 557
556DEFUN ("Snarf-documentation", Fsnarf_documentation, Ssnarf_documentation, 558DEFUN ("Snarf-documentation", Fsnarf_documentation, Ssnarf_documentation,
557 1, 1, 0, 559 1, 1, 0,
@@ -598,32 +600,9 @@ the same file name is found in the `doc-directory'. */)
598 /* Vbuild_files is nil when temacs is run, and non-nil after that. */ 600 /* Vbuild_files is nil when temacs is run, and non-nil after that. */
599 if (NILP (Vbuild_files)) 601 if (NILP (Vbuild_files))
600 { 602 {
601 size_t cp_size = 0; 603 const char *beg, *end;
602 size_t to_read;
603 int nr_read;
604 char *cp = NULL;
605 char *beg, *end;
606
607 fd = emacs_open ("buildobj.lst", O_RDONLY, 0);
608 if (fd < 0)
609 report_file_error ("Opening file buildobj.lst", Qnil);
610
611 filled = 0;
612 for (;;)
613 {
614 cp_size += 1024;
615 to_read = cp_size - 1 - filled;
616 cp = xrealloc (cp, cp_size);
617 nr_read = emacs_read (fd, &cp[filled], to_read);
618 filled += nr_read;
619 if (nr_read < to_read)
620 break;
621 }
622 604
623 emacs_close (fd); 605 for (beg = buildobj; *beg; beg = end)
624 cp[filled] = 0;
625
626 for (beg = cp; *beg; beg = end)
627 { 606 {
628 int len; 607 int len;
629 608
@@ -639,8 +618,6 @@ the same file name is found in the `doc-directory'. */)
639 if (len > 0) 618 if (len > 0)
640 Vbuild_files = Fcons (make_string (beg, len), Vbuild_files); 619 Vbuild_files = Fcons (make_string (beg, len), Vbuild_files);
641 } 620 }
642
643 xfree (cp);
644 } 621 }
645 622
646 fd = emacs_open (name, O_RDONLY, 0); 623 fd = emacs_open (name, O_RDONLY, 0);
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 05696072ec0..f3468a0482a 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -178,10 +178,24 @@ $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) \
178 ../nt/$(BLD)/addsection.exe 178 ../nt/$(BLD)/addsection.exe
179 $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) 179 $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
180 "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 21 180 "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 21
181 echo $(OBJ0) > $(BLD)/buildobj.lst 181
182 echo $(OBJ1) >> $(BLD)/buildobj.lst 182# These omit firstfile.${O}, but there's no documentation in there
183 echo $(WIN32OBJ) >> $(BLD)/buildobj.lst 183# anyways.
184 echo $(FONTOBJ) >> $(BLD)/buildobj.lst 184$(SRC)/buildobj.h: make-buildobj-$(SHELLTYPE)
185make-buildobj-CMD: Makefile
186 echo #define BUILDOBJ ^"\ > $(SRC)/buildobj.h
187 echo $(OBJ0) \ >> $(SRC)/buildobj.h
188 echo $(OBJ1) \ >> $(SRC)/buildobj.h
189 echo $(WIN32OBJ) \ >> $(SRC)/buildobj.h
190 echo $(FONTOBJ) \ >> $(SRC)/buildobj.h
191 echo ^" >> $(SRC)/buildobj.h
192make-buildobj-SH: Makefile
193 echo '#define BUILDOBJ $(DQUOTE)\\' > $(SRC)/buildobj.h
194 echo $(OBJ0) '\\' >> $(SRC)/buildobj.h
195 echo $(OBJ1) '\\' >> $(SRC)/buildobj.h
196 echo $(WIN32OBJ) '\\' >> $(SRC)/buildobj.h
197 echo $(FONTOBJ) '\\' >> $(SRC)/buildobj.h
198 echo '$(DQUOTE)' >> $(SRC)/buildobj.h
185 199
186bootstrap: bootstrap-emacs 200bootstrap: bootstrap-emacs
187 201
@@ -580,6 +594,7 @@ $(BLD)/dispnew.$(O) : \
580$(BLD)/doc.$(O) : \ 594$(BLD)/doc.$(O) : \
581 $(SRC)/doc.c \ 595 $(SRC)/doc.c \
582 $(CONFIG_H) \ 596 $(CONFIG_H) \
597 $(SRC)/buildobj.h \
583 $(EMACS_ROOT)/nt/inc/unistd.h \ 598 $(EMACS_ROOT)/nt/inc/unistd.h \
584 $(EMACS_ROOT)/nt/inc/sys/file.h \ 599 $(EMACS_ROOT)/nt/inc/sys/file.h \
585 $(EMACS_ROOT)/nt/inc/sys/time.h \ 600 $(EMACS_ROOT)/nt/inc/sys/time.h \