From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: build system observations (was Re: Emacs.app merged) Date: Mon, 04 Aug 2008 22:13:37 -0700 Message-ID: <200808050513.m755Db39008109@sallyv1.ics.uci.edu> References: <1C66F1FC-BF82-4365-944D-ADCC4D1F435C@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1217913360 22437 80.91.229.12 (5 Aug 2008 05:16:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2008 05:16:00 +0000 (UTC) Cc: emacs- devel To: Adrian Robert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 05 07:16:50 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 1KQEuc-0000OV-VF for ged-emacs-devel@m.gmane.org; Tue, 05 Aug 2008 07:16:47 +0200 Original-Received: from localhost ([127.0.0.1]:54965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQEth-0002Ug-EO for ged-emacs-devel@m.gmane.org; Tue, 05 Aug 2008 01:15:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQEtb-0002Ub-4f for emacs-devel@gnu.org; Tue, 05 Aug 2008 01:15:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQEta-0002UP-9k for emacs-devel@gnu.org; Tue, 05 Aug 2008 01:15:42 -0400 Original-Received: from [199.232.76.173] (port=56019 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQEta-0002UM-0m for emacs-devel@gnu.org; Tue, 05 Aug 2008 01:15:42 -0400 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]:58931) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1KQEtZ-0008FW-LU for emacs-devel@gnu.org; Tue, 05 Aug 2008 01:15:41 -0400 X-ICS-MailScanner-Watermark: 1218518018.55426@iyrCPXciZ5y7L8iWAdew1Q Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m755Db39008109; Mon, 4 Aug 2008 22:13:37 -0700 (PDT) In-Reply-To: <1C66F1FC-BF82-4365-944D-ADCC4D1F435C@gmail.com> (Adrian Robert's message of "Tue, 15 Jul 2008 14:47:21 -0400") Original-Lines: 90 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) 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:102073 Archived-At: Here are some comments on the build system changes for NS. 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. # 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. # ifdef C_SWITCH_SYSTEM # undef C_SWITCH_SYSTEM # endif This sequence has not effect, it can be removed. 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. /* 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. .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 Why the #ifdef, can't the GNU_OBJC_CFLAGS be used instead? 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. #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. #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. 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. Hope this helps.