emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r100046: Reduce CPP usage.


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100046: Reduce CPP usage.
Date: Mon, 26 Apr 2010 22:24:53 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100046
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Mon 2010-04-26 22:24:53 -0700
message:
  Reduce CPP usage.
  * Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE, C_SWITCH_X_SITE): Remove
  definitions and undefs.  Inline definitions in the only user.
  (ALL_CFLAGS): Substitute C_SWITCH_X_SYSTEM using autoconf.
  
  * Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf.
  
  * Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf.
  
  * configure.in (C_SWITCH_X_SYSTEM): Define using autoconf, not cpp.
modified:
  ChangeLog
  configure.in
  lwlib/ChangeLog
  lwlib/Makefile.in
  oldXMenu/ChangeLog
  oldXMenu/Makefile.in
  src/ChangeLog
  src/Makefile.in
=== modified file 'ChangeLog'
--- a/ChangeLog 2010-04-27 03:47:47 +0000
+++ b/ChangeLog 2010-04-27 05:24:53 +0000
@@ -5,6 +5,7 @@
        (unexec): Define unconditionally, all platforms define
        UNEXEC.  AC_SUBST it.
        (UNEXEC_SRC): Remove, unused.
+       (C_SWITCH_X_SYSTEM): Define using autoconf, not cpp.
 
 2010-04-27  Glenn Morris  <address@hidden>
 

=== modified file 'configure.in'
--- a/configure.in      2010-04-27 03:47:47 +0000
+++ b/configure.in      2010-04-27 05:24:53 +0000
@@ -2260,6 +2260,7 @@
 dnl Check for malloc/malloc.h on darwin
 AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define 
to 1 if you have the <malloc/malloc.h> header file.])])
 
+C_SWITCH_X_SYSTEM=
 ### Use NeXTstep API to implement GUI.
 if test "${HAVE_NS}" = "yes"; then
   AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either 
GNUstep or Cocoa on Mac OS X.])
@@ -2269,6 +2270,9 @@
   fi
   if test "${NS_IMPL_GNUSTEP}" = "yes"; then
     AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing 
under GNUstep.])
+    # See also .m.o rule in Makefile.in */
+    # FIXME: are all these flags really needed?  Document here why.  */
+    C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
     GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import 
-fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 
-DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
   fi
   if test "${NS_HAVE_NSINTEGER}" = "yes"; then
@@ -2763,6 +2767,7 @@
 AC_SUBST(LD_SWITCH_X_SITE)
 AC_SUBST(LD_SWITCH_X_SITE_AUX)
 AC_SUBST(C_SWITCH_X_SITE)
+AC_SUBST(C_SWITCH_X_SYSTEM)
 AC_SUBST(CFLAGS)
 AC_SUBST(X_TOOLKIT_TYPE)
 AC_SUBST(machfile)
@@ -2933,9 +2938,6 @@
    parallel this exactly since GNUstep is multi-OS. */
 #ifdef HAVE_NS
 # ifdef NS_IMPL_GNUSTEP
-/* See also .m.o rule in Makefile.in */
-/* FIXME: are all these flags really needed?  Document here why.  */
-#  define C_SWITCH_X_SYSTEM -D_REENTRANT -fPIC -fno-strict-aliasing
 /* GNUstep needs a bit more pure memory.  Of the existing knobs,
 SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems.  */
 #  define SYSTEM_PURESIZE_EXTRA 30000

=== modified file 'lwlib/ChangeLog'
--- a/lwlib/ChangeLog   2010-04-21 16:13:55 +0000
+++ b/lwlib/ChangeLog   2010-04-27 05:24:53 +0000
@@ -1,3 +1,7 @@
+2010-04-27  Dan Nicolaescu  <address@hidden>
+
+       * Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf.
+
 2010-04-21  Jan Djärv  <address@hidden>
 
        * xlwmenu.c (expose_cb):

=== modified file 'lwlib/Makefile.in'
--- a/lwlib/Makefile.in 2010-04-11 20:17:24 +0000
+++ b/lwlib/Makefile.in 2010-04-27 05:24:53 +0000
@@ -26,6 +26,7 @@
 address@hidden@
 address@hidden@
 address@hidden@
address@hidden@
 address@hidden@
 address@hidden@
 

=== modified file 'oldXMenu/ChangeLog'
--- a/oldXMenu/ChangeLog        2010-04-23 22:28:10 +0000
+++ b/oldXMenu/ChangeLog        2010-04-27 05:24:53 +0000
@@ -1,3 +1,7 @@
+2010-04-27  Dan Nicolaescu  <address@hidden>
+
+       * Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf.
+
 2010-04-23  Dan Nicolaescu  <address@hidden>
 
        * Makefile.in (ALL_CFLAGS): Remove C_SWITCH_X_MACHINE, unused.

=== modified file 'oldXMenu/Makefile.in'
--- a/oldXMenu/Makefile.in      2010-04-23 22:28:10 +0000
+++ b/oldXMenu/Makefile.in      2010-04-27 05:24:53 +0000
@@ -46,6 +46,7 @@
 address@hidden@
 address@hidden@
 address@hidden@
address@hidden@
 address@hidden@
 address@hidden@
 

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-04-27 03:47:47 +0000
+++ b/src/ChangeLog     2010-04-27 05:24:53 +0000
@@ -3,6 +3,9 @@
        Reduce CPP usage.
        * Makefile.in (LIB_X11_LIB): Remove, inline in the only user.
        (obj): Use autoconf for unexec instead of cpp.
+       (C_SWITCH_SYSTEM, C_SWITCH_MACHINE, C_SWITCH_X_SITE): Remove
+       definitions and undefs.  Inline definitions in the only user.
+       (ALL_CFLAGS): Substitute C_SWITCH_X_SYSTEM using autoconf.
 
 2010-04-27  Glenn Morris  <address@hidden>
 

=== modified file 'src/Makefile.in'
--- a/src/Makefile.in   2010-04-27 03:47:47 +0000
+++ b/src/Makefile.in   2010-04-27 05:24:53 +0000
@@ -77,11 +77,6 @@
 address@hidden@
 address@hidden@
 
address@hidden@
address@hidden@
-
address@hidden@
-
 DBUS_CFLAGS = @DBUS_CFLAGS@
 DBUS_LIBS = @DBUS_LIBS@
 DBUS_OBJ = @DBUS_OBJ@
@@ -130,11 +125,6 @@
 DEPFLAGS = -MMD -MF deps/$*.d
 #endif
 
-/* Undefine until the user can be moved in the non-cpp section. */
-#undef C_SWITCH_SYSTEM
-#undef C_SWITCH_MACHINE
-#undef C_SWITCH_X_SITE
-
 /* Do not let the file name mktime.c get messed up.  */
 #ifdef mktime
 #undef mktime
@@ -196,18 +186,10 @@
 #endif
 
 /* These macros are for switches specifically related to X Windows.  */
-#ifndef C_SWITCH_X_SYSTEM
-#define C_SWITCH_X_SYSTEM
-#endif
-
 #ifndef LD_SWITCH_X_SITE
 #define LD_SWITCH_X_SITE
 #endif
 
-#ifndef LD_SWITCH_X_DEFAULT
-#define LD_SWITCH_X_DEFAULT
-#endif
-
 STARTFILES = START_FILES
 
 
@@ -231,13 +213,9 @@
    -DHAVE_CONFIG_H is needed for some other files to take advantage of
    the information in ``config.h''.  */
 
-#undef C_SWITCH_MACHINE
-#undef C_SWITCH_SYSTEM
-#undef C_SWITCH_X_SITE
-
 /* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM
    since it may have -I options that should override those two.  */
-ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} 
$(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) C_SWITCH_X_SYSTEM 
${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} 
@FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ 
${DEPFLAGS}
+ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} 
@c_switch_machine@ @c_switch_system@ @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ 
${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} 
@FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ 
${DEPFLAGS}
 ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
 
 .SUFFIXES: .m
@@ -311,9 +289,7 @@
 #endif /* not USE_X_TOOLKIT */
 
 #ifdef HAVE_X11
-/* LD_SWITCH_X_DEFAULT comes after everything else that specifies
-   options for where to find X libraries, but before those libraries.  */
-X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
+X11_LDFLAGS = LD_SWITCH_X_SITE
 LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) $(LIBTIFF) $(LIBJPEG) $(LIBPNG) 
$(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS)
 #else /* not HAVE_X11 */
 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE
@@ -840,17 +816,12 @@
 /* Supply an ordering for parallel make.  */
 ../src/$(OLDXMENU): ${OLDXMENU}
 
-/* Encode the values of these two macros in Make variables,
-   so we can use $(...) to substitute their values within "...".  */
-C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
-
 #ifdef USE_X_TOOLKIT
 $(OLDXMENU): really-lwlib
 
 really-lwlib:
        cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
-    CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
-    "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)"
+    CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
        @true  /* make -t should not create really-lwlib.  */
 .PHONY: really-lwlib
 #else /* not USE_X_TOOLKIT */
@@ -858,8 +829,7 @@
 
 really-oldXMenu:
        cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \
-    CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
-    "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)"
+    CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
        @true  /* make -t should not create really-oldXMenu.  */
 .PHONY: really-oldXMenu
 #endif /* not USE_X_TOOLKIT */


reply via email to

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