[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: build system observations (was Re: Emacs.app merged)
From: |
Adrian Robert |
Subject: |
Re: build system observations (was Re: Emacs.app merged) |
Date: |
Wed, 6 Aug 2008 12:25:50 -0400 |
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.