1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-21 10:24:55 +00:00

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.
This commit is contained in:
Dan Nicolaescu 2010-04-26 22:24:53 -07:00
parent aaa36002be
commit ed6281b066
8 changed files with 23 additions and 37 deletions

View File

@ -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>

View File

@ -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

View File

@ -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):

View File

@ -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@

View File

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

View File

@ -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@

View File

@ -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>

View File

@ -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 */