From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: buildobj.lst and Windows builds - a tiny bit of help needed? Date: Sun, 23 Aug 2009 03:50:30 -0400 Message-ID: <4CC1CF5E-088F-459E-BCF7-61DEFA747DE1@raeburn.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary=Apple-Mail-37--23792295 X-Trace: ger.gmane.org 1251013871 17228 80.91.229.12 (23 Aug 2009 07:51:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Aug 2009 07:51:11 +0000 (UTC) To: Emacs Developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 23 09:51:04 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mf7qw-0006E8-3y for ged-emacs-devel@m.gmane.org; Sun, 23 Aug 2009 09:51:03 +0200 Original-Received: from localhost ([127.0.0.1]:44009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mf7qv-0007VK-Jh for ged-emacs-devel@m.gmane.org; Sun, 23 Aug 2009 03:51:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mf7qo-0007Tj-P7 for emacs-devel@gnu.org; Sun, 23 Aug 2009 03:50:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mf7qk-0007TR-H4 for emacs-devel@gnu.org; Sun, 23 Aug 2009 03:50:53 -0400 Original-Received: from [199.232.76.173] (port=35302 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mf7qi-0007TO-Ud for emacs-devel@gnu.org; Sun, 23 Aug 2009 03:50:49 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:44087) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mf7qi-0004Nv-3w for emacs-devel@gnu.org; Sun, 23 Aug 2009 03:50:48 -0400 Original-Received: from splat.raeburn.org ([69.25.196.39] helo=raeburn.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mf7qV-0004DL-91 for emacs-devel@gnu.org; Sun, 23 Aug 2009 03:50:47 -0400 Original-Received: from [10.0.0.172] (squish.raeburn.org [10.0.0.172]) by raeburn.org (8.14.3/8.14.1) with ESMTP id n7N7oUDk001975; Sun, 23 Aug 2009 03:50:31 -0400 (EDT) X-Mailer: Apple Mail (2.936) X-Detected-Operating-System: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114529 Archived-At: --Apple-Mail-37--23792295 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit As part of trying to make CANNOT_DUMP builds work better, I want to have the list of object files, currently written into buildobj.lst by make and read back by temacs during loadup, compiled into the executable instead. (Snarf-documentation needs the list to know which bits of documentation to extract from the generated DOC file, since some symbols appear in multiple source files.) I've created a simple patch to create a header file on UNIX that doc.c can include to get the list instead of opening a file and growing a buffer to read the contents into; it just needs to define one macro that expands to a string initializer. I've made an attempt to write the changes for the Windows build process, but I don't currently have a machine to test them, especially with all the permutations of make versions and shells to run under them. Could someone with the relevant expertise and/or equipment please take a minute and let me know the right way to make this change? I think it should be pretty straightforward, as you can see from the changes in the attached diff, but it does involve make commands that have to write double-quotes and backslashes to files (and thus get the quoting right), and an object file list that is supposedly too long to process on one command line... Ken --Apple-Mail-37--23792295 Content-Disposition: attachment; filename=buildobj.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="buildobj.diff" Content-Transfer-Encoding: 7bit Index: src/Makefile.in =================================================================== RCS file: /sources/emacs/emacs/src/Makefile.in,v retrieving revision 1.445 diff -p -u -r1.445 Makefile.in --- src/Makefile.in 23 Aug 2009 04:43:12 -0000 1.445 +++ src/Makefile.in 23 Aug 2009 07:28:51 -0000 @@ -938,8 +938,10 @@ ${etc}DOC: ${libsrc}make-docfile${EXEEXT ${libsrc}make-docfile${EXEEXT}: cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT} +buildobj.h: Makefile + echo "#define BUILDOBJ \"${obj} ${otherobj} " OBJECTS_MACHINE "\"" > buildobj.h + temacs${EXEEXT}: $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} - echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst #ifdef NS_IMPL_GNUSTEP $(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \ -L@GNUSTEP_SYSTEM_LIBRARIES@ -lgnustep-gui -lgnustep-base \ @@ -1064,7 +1066,8 @@ dispnew.o: dispnew.c systime.h commands. disptab.h indent.h $(INTERVALS_H) \ xterm.h blockinput.h atimer.h character.h msdos.h composite.h keyboard.h \ syssignal.h $(config_h) -doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h keymap.h character.h +doc.o: doc.c $(config_h) epaths.h buffer.h keyboard.h keymap.h character.h \ + buildobj.h doprnt.o: doprnt.c character.h $(config_h) dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \ @@ -1284,7 +1287,7 @@ mostlyclean: rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a rm -f ../etc/DOC rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} - rm -f buildobj.lst + rm -f buildobj.h clean: mostlyclean rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT} #ifdef HAVE_NS Index: src/doc.c =================================================================== RCS file: /sources/emacs/emacs/src/doc.c,v retrieving revision 1.134 diff -p -u -r1.134 doc.c --- src/doc.c 8 Jan 2009 03:15:32 -0000 1.134 +++ src/doc.c 23 Aug 2009 07:28:51 -0000 @@ -42,6 +42,7 @@ along with GNU Emacs. If not, see 0) Vbuild_files = Fcons (make_string (beg, len), Vbuild_files); } - - xfree (cp); } fd = emacs_open (name, O_RDONLY, 0); Index: src/makefile.w32-in =================================================================== RCS file: /sources/emacs/emacs/src/makefile.w32-in,v retrieving revision 1.77 diff -p -u -r1.77 makefile.w32-in --- src/makefile.w32-in 11 Mar 2009 01:02:07 -0000 1.77 +++ src/makefile.w32-in 23 Aug 2009 07:28:51 -0000 @@ -178,10 +178,16 @@ $(TEMACS): $(TLIB0) $(TLIB1) $(TLIB ../nt/$(BLD)/addsection.exe $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 21 - echo $(OBJ0) > $(BLD)/buildobj.lst - echo $(OBJ1) >> $(BLD)/buildobj.lst - echo $(WIN32OBJ) >> $(BLD)/buildobj.lst - echo $(FONTOBJ) >> $(BLD)/buildobj.lst + +# This omits firstfile.${O}, but there's no documentation in there +# anyways. +$(SRC)/buildobj.h: Makefile + echo "#define BUILDOBJ \"\\" > $(SRC)/buildobj.h + echo $(OBJ0) "\\" >> $(SRC)/buildobj.h + echo $(OBJ1) "\\" >> $(SRC)/buildobj.h + echo $(WIN32OBJ) "\\" >> $(SRC)/buildobj.h + echo $(FONTOBJ) "\\" >> $(SRC)/buildobj.h + echo "\"" >> $(SRC)/buildobj.h bootstrap: bootstrap-emacs @@ -580,6 +586,7 @@ $(BLD)/dispnew.$(O) : \ $(BLD)/doc.$(O) : \ $(SRC)/doc.c \ $(CONFIG_H) \ + $(SRC)/buildobj.h \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ --Apple-Mail-37--23792295 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-37--23792295--