emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

build system observations (was Re: Emacs.app merged)


From: Dan Nicolaescu
Subject: build system observations (was Re: Emacs.app merged)
Date: Mon, 04 Aug 2008 22:13:37 -0700

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]