diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-04-26 22:24:53 -0700 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-04-26 22:24:53 -0700 |
commit | ed6281b066a0c183b3bdd8473dd412ca72cb173e (patch) | |
tree | 908f94a409e601f755b0c6da347612db9a48ad00 | |
parent | aaa36002bef7223e1dce0b0431d54f728ef589ba (diff) | |
download | emacs-ed6281b066a0c183b3bdd8473dd412ca72cb173e.tar.gz |
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.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | lwlib/ChangeLog | 4 | ||||
-rw-r--r-- | lwlib/Makefile.in | 1 | ||||
-rw-r--r-- | oldXMenu/ChangeLog | 4 | ||||
-rw-r--r-- | oldXMenu/Makefile.in | 1 | ||||
-rw-r--r-- | src/ChangeLog | 3 | ||||
-rw-r--r-- | src/Makefile.in | 38 |
8 files changed, 23 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog index dd9b04f4244..8926df34ad6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 <rgm@gnu.org> diff --git a/configure.in b/configure.in index 04da6d4632b..d4806195f18 100644 --- a/configure.in +++ b/configure.in @@ -2260,6 +2260,7 @@ AC_SUBST(LIBGPM) 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 @@ if test "${HAVE_NS}" = "yes"; then 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(unexec) 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 @@ AH_BOTTOM([ 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 diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 52728552eac..ec764072cf1 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +2010-04-27 Dan Nicolaescu <dann@ics.uci.edu> + + * Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf. + 2010-04-21 Jan Djärv <jan.h.d@swipnet.se> * xlwmenu.c (expose_cb): diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index c79292ea59c..468d1edc50b 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in @@ -26,6 +26,7 @@ srcdir=@srcdir@ VPATH=@srcdir@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ +C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ C_SWITCH_SYSTEM=@c_switch_system@ C_SWITCH_MACHINE=@c_switch_machine@ diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog index 48e7a30020e..49569e5f79b 100644 --- a/oldXMenu/ChangeLog +++ b/oldXMenu/ChangeLog @@ -1,3 +1,7 @@ +2010-04-27 Dan Nicolaescu <dann@ics.uci.edu> + + * Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf. + 2010-04-23 Dan Nicolaescu <dann@ics.uci.edu> * Makefile.in (ALL_CFLAGS): Remove C_SWITCH_X_MACHINE, unused. diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in index b729f34ee93..52c6fe97428 100644 --- a/oldXMenu/Makefile.in +++ b/oldXMenu/Makefile.in @@ -46,6 +46,7 @@ srcdir=@srcdir@ VPATH=@srcdir@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ +C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ C_SWITCH_SYSTEM=@c_switch_system@ C_SWITCH_MACHINE=@c_switch_machine@ diff --git a/src/ChangeLog b/src/ChangeLog index dbcb185deb8..53d11c87a63 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 <rgm@gnu.org> diff --git a/src/Makefile.in b/src/Makefile.in index 45a3031a0f2..e1933a37388 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -77,11 +77,6 @@ LIBGIF=@LIBGIF@ LIBXPM=@LIBXPM@ XFT_LIBS=@XFT_LIBS@ -C_SWITCH_SYSTEM=@c_switch_system@ -C_SWITCH_MACHINE=@c_switch_machine@ - -C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ - DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_OBJ = @DBUS_OBJ@ @@ -130,11 +125,6 @@ SHELL=/bin/sh 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 @@ DEPFLAGS = -MMD -MF deps/$*.d #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 @@ shared=no -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 @@ LIBXT=$(LIBW) $(LIBXSM) #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 @@ stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU) /* 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 @@ $(OLDXMENU): really-oldXMenu 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 */ |