From: Dan Nicolaescu <dann@ics.uci.edu>
To: Adrian Robert <adrian.b.robert@gmail.com>
Cc: emacs- devel <emacs-devel@gnu.org>
Subject: build system observations (was Re: Emacs.app merged)
Date: Mon, 04 Aug 2008 22:13:37 -0700 [thread overview]
Message-ID: <200808050513.m755Db39008109@sallyv1.ics.uci.edu> (raw)
In-Reply-To: <1C66F1FC-BF82-4365-944D-ADCC4D1F435C@gmail.com> (Adrian Robert's message of "Tue, 15 Jul 2008 14:47:21 -0400")
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.
next prev parent reply other threads:[~2008-08-05 5:13 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 18:47 Emacs.app merged Adrian Robert
2008-07-15 18:49 ` İsmail Dönmez
2008-07-15 19:28 ` Chong Yidong
2008-07-15 22:32 ` Thomas Christensen
2008-07-15 23:29 ` Cezar Halmagean
2008-07-16 9:25 ` a review of the merge (Re: Emacs.app merged) Dan Nicolaescu
2008-07-16 10:00 ` Jason Rumney
2008-07-16 12:17 ` Adrian Robert
2008-07-16 16:15 ` Stefan Monnier
2008-07-16 16:21 ` Stefan Monnier
2008-07-16 21:23 ` Dan Nicolaescu
2008-07-20 1:27 ` Adrian Robert
2008-07-20 11:56 ` Dan Nicolaescu
2008-07-28 13:25 ` Adrian Robert
2008-07-28 19:00 ` Dan Nicolaescu
2008-08-01 10:48 ` Adrian Robert
2008-08-01 11:09 ` Jason Rumney
2008-08-01 12:55 ` Dan Nicolaescu
2008-08-01 13:36 ` Eli Zaretskii
2008-08-01 13:49 ` Jason Rumney
2008-08-01 14:23 ` Dan Nicolaescu
2008-08-01 14:48 ` Adrian Robert
2008-08-01 15:07 ` Dan Nicolaescu
2008-07-17 1:25 ` Adrian Robert
2008-07-17 3:24 ` Dan Nicolaescu
2008-07-17 4:16 ` FOR-RELEASE [was Re: a review of the merge (Re: Emacs.app merged)] Glenn Morris
2008-07-17 4:19 ` a review of the merge (Re: Emacs.app merged) Glenn Morris
2008-07-17 17:22 ` Adrian Robert
2008-07-17 18:08 ` Dan Nicolaescu
2008-07-17 3:43 ` Stefan Monnier
2008-07-17 7:33 ` David De La Harpe Golden
2008-07-17 6:55 ` Dan Nicolaescu
2008-07-16 19:26 ` Emacs.app merged Stefan Monnier
2008-07-17 1:26 ` Adrian Robert
2008-07-27 20:12 ` some missing code? (was: Re: Emacs.app merged) Dan Nicolaescu
2008-07-27 22:18 ` observations for ns*.m files (Re: " Dan Nicolaescu
2008-07-28 1:54 ` Adrian Robert
2008-07-28 2:58 ` Dan Nicolaescu
2008-07-28 4:16 ` Stefan Monnier
2008-07-28 11:00 ` Miles Bader
2008-07-28 7:15 ` Jason Rumney
2008-07-28 13:29 ` Adrian Robert
2008-07-28 13:54 ` Chong Yidong
2008-07-28 15:10 ` Jason Rumney
2008-07-28 13:28 ` Adrian Robert
2008-07-28 14:35 ` Dan Nicolaescu
2008-08-05 5:13 ` Dan Nicolaescu [this message]
2008-08-06 16:25 ` build system observations (was " Adrian Robert
2008-08-06 17:29 ` build system observations Dan Nicolaescu
2008-08-07 1:36 ` Adrian Robert
2008-09-05 15:03 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200808050513.m755Db39008109@sallyv1.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=adrian.b.robert@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.