From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.devel Subject: Re: build system observations (was Re: Emacs.app merged) Date: Wed, 6 Aug 2008 12:25:50 -0400 Message-ID: <56D8F202-EF53-439B-8EBB-11782EBCFE93@gmail.com> References: <1C66F1FC-BF82-4365-944D-ADCC4D1F435C@gmail.com> <200808050513.m755Db39008109@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v926) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218040114 20154 80.91.229.12 (6 Aug 2008 16:28:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2008 16:28:34 +0000 (UTC) Cc: emacs- devel To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 06 18:29:25 2008 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 1KQlt6-0006oZ-0C for ged-emacs-devel@m.gmane.org; Wed, 06 Aug 2008 18:29:25 +0200 Original-Received: from localhost ([127.0.0.1]:45720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQls9-0005Wh-DU for ged-emacs-devel@m.gmane.org; Wed, 06 Aug 2008 12:28:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQlqT-0003IS-El for emacs-devel@gnu.org; Wed, 06 Aug 2008 12:26:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQlqR-0003G1-TQ for emacs-devel@gnu.org; Wed, 06 Aug 2008 12:26:40 -0400 Original-Received: from [199.232.76.173] (port=37382 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQlqR-0003Fm-MK for emacs-devel@gnu.org; Wed, 06 Aug 2008 12:26:39 -0400 Original-Received: from yw-out-1718.google.com ([74.125.46.157]:30239) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQlqR-0000nY-L0 for emacs-devel@gnu.org; Wed, 06 Aug 2008 12:26:39 -0400 Original-Received: by yw-out-1718.google.com with SMTP id 9so1606149ywk.66 for ; Wed, 06 Aug 2008 09:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=KlAyxsDh3sWbVxgWD0zTYbvAkDnAGt0B1Qr6tBbu7yA=; b=Dvs/FuiAnK+ijzIL08FmINz4U89Z4h4RHc+d42LGVZKb92aCTsPQni2e4xjdRVsu1K 56pSh7X39h/6rHXeWkvYJ23r0+pHHfHZchd/jQABcQK72lLJULhCrpYzp8dYCM/hfA+W 3TOmT1XQMoA1t2/PS8iVolOSX62fBvMG0wz44= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=swIgJy/iHFeGp9c2hNNSlJuOK9vYBUBjOp/C1S1ayXR+74aKWa9lUS2HEbBbEq5A/F BcR1xsiHfUAJCE5xT+PSIo16E7HVHQ9n2MOqZjqBMpcem3X04IUIQRGKpD4MDuFbv8Ud hw2yyC9qUf6oyLGOnzhaC2cjoqM9tPhqbSRlU= Original-Received: by 10.114.192.3 with SMTP id p3mr499163waf.112.1218039997730; Wed, 06 Aug 2008 09:26:37 -0700 (PDT) Original-Received: from ?10.0.1.200? ( [97.73.30.9]) by mx.google.com with ESMTPS id i37sm7917968wxd.29.2008.08.06.09.26.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 06 Aug 2008 09:26:32 -0700 (PDT) In-Reply-To: <200808050513.m755Db39008109@sallyv1.ics.uci.edu> X-Mailer: Apple Mail (2.926) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:102127 Archived-At: On Aug 5, 2008, at 1:13 AM, Dan Nicolaescu wrote: > Here are some comments on the build system changes for NS. Thanks.. I'll address what I'm able to below. > configure.in: > #ifdef HAVE_NS > # ifdef NS_IMPL_GNUSTEP > /* See also .m.o rule in Makefile.in */ > # define C_SWITCH_X_SYSTEM -MMD -MP -D_REENTRANT -fPIC -fno-strict- > aliasing > ^^^^^^^^^ > Does anything use the dependency info > produced here? If not, better not produce it. OK, I removed -MMD -MP (probably came from early attempts to replicate gnustep-make behavior), but I cannot test the effect -- can anyone compiling under GNUstep let me know if it causes problems? > # define GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant- > string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 - > DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE > This is a new flag, better use autoconf substitions instead of > the preprocessor. I'm not sure how to do this, but have no objection to someone else making the change if it simplifies things. > # ifdef C_SWITCH_SYSTEM > # undef C_SWITCH_SYSTEM > # endif > > This sequence has not effect, it can be removed. This actually comes BEFORE the above definitions, and is to prevent redefinition errors. Some files under src/s define this, but they do so for X-Windows purposes. The NS port using GNUstep can be built on these systems and therefore needs to change the switch. > lib-src/Makefile.in: > > #if defined(NS_IMPL_COCOA) > /* Build these programs as universal binaries. */ > CFLAGS := $(CFLAGS) -universal > > Is this needed? It does not seem that the emacs binary itself is > built in the same way. > There are many ways of adding stuff to CFLAGS, it's cleaner to not > add yet another #ifdef for this. I took it out. Anyone attempting to build a binary distribution will need to add -universal to CFLAGS, but only in lib-src. What is the easiest way to do this? > /* Add mac-fix-env for OS X systems running NS version. */ > INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} b2m > ${EXEEXT} ebrowse${EXEEXT} mac-fix-env${EXEEXT} > This can be done more elegantly with and autoconf substitution like > this: > > INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} b2m > ${EXEEXT} ebrowse${EXEEXT} @LIB_SRC_EXTRA_INSTALLABLES@ > > and define LIB_SRC_EXTRA_INSTALLABLES with the right value in the > NS_IMPL_COCOA case. This sounds good (maybe LIB_SRC_ARCHDEP_INSTALLABLES) but I don't trust my autoconf skills enough to attempt this change. > .m.o: > #ifdef NS_IMPL_GNUSTEP > $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -fgnu-runtime -Wno-import - > fconstant-string-class=NSConstantString $< > #else > $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< > #endif I got rid of it, unneeded since only .m is compiled on Cocoa. > src/Makefile.in: > > /* XXX: not working under NS currently due to path shenanigans.. */ > #ifndef HAVE_NS > -./emacs -q -batch -f list-load-path-shadows > #endif > > This just hides problems and complicates the Makefile. Better > take the #ifndef out. I'd welcome help on this one. I guess the Carbon port didn't need it, but despite NS using identical "path shenanigans" to the Carbon port, it didn't work there. Not sure what the problem is. > #ifdef NS_IMPL_GNUSTEP > rm -f *.d > #endif > If dependency info is not produced with C_SWITCH_X_SYSTEM, then > there's no need to remove it here. OK, done. > #ifdef HAVE_NS > buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \ > fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o > process.o \ > scroll.o sysdep.o term.o widget.o window.o xdisp.o xfaces.o > sound.o: nsgui.h > This can be solved by adding an autoconf variable NSGUI_H and > make all > these .o file depend on $(NSGUI_H) which is nsgui.h for NS and > nothing everywhere else. > After that the above #ifdef can probably be removed. This sounds more complicated than what is there now. If the goal is to get rid of the Makefile.c system shouldn't this be done all at once and for all GUIs? (Most of the #ifdef complexity in that file is not due to NS.) > nsfns.o: nsfns.m charset.h nsterm.h nsgui.h frame.h window.h > buffer.h \ > dispextern.h nsgui.h fontset.h $(INTERVAL_SRC) keyboard.h > blockinput.h \ > atimer.h systime.h epaths.h termhooks.h coding.h systime.h $ > (config_h) > nsmenu.o: nsmenu.m termhooks.h frame.h window.h dispextern.h \ > nsgui.h keyboard.h blockinput.h atimer.h systime.h buffer.h \ > nsterm.h $(config_h) > nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h > nsterm.h \ > nsgui.h frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h \ > termopts.h termchar.h disptab.h buffer.h window.h keyboard.h \ > $(INTERVAL_SRC) process.h coding.h $(config_h) > nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h $ > (config_h) > nsimage.o: nsimage.m nsterm.h > nsfont.o: nsterm.h dispextern.h frame.h lisp.h $(config_h) > > All these can go in the alphabetical list of dependencies. Moved. Note the following files are placed out of order at the end of the list for some reason: gtkutil.o dbusbind.o hftctl.o sound.o atimer.o In the "Lisp proper" section, lread.o is out of order. Under "Text properties support", the files are in reverse alphabetical.