[Top][All Lists]

[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.

#ifdef HAVE_NS
/* 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 
      This is a new flag, better use autoconf substitions instead of the 

# endif

This sequence has not effect, it can be removed.


#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} 

  and define LIB_SRC_EXTRA_INSTALLABLES with the right value in the 

       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -fgnu-runtime -Wno-import 
-fconstant-string-class=NSConstantString $<
        $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<

  Why the #ifdef, can't the GNU_OBJC_CFLAGS be used instead?


/* XXX: not working under NS currently due to path shenanigans.. */
#ifndef HAVE_NS
        -./emacs -q -batch -f list-load-path-shadows

    This just hides problems and complicates the Makefile.  Better take the 
#ifndef out.

       rm -f *.d
   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]