diff options
| author | Dan Nicolaescu | 2010-04-26 22:24:53 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-04-26 22:24:53 -0700 |
| commit | ed6281b066a0c183b3bdd8473dd412ca72cb173e (patch) | |
| tree | 908f94a409e601f755b0c6da347612db9a48ad00 /src | |
| parent | aaa36002bef7223e1dce0b0431d54f728ef589ba (diff) | |
| download | emacs-ed6281b066a0c183b3bdd8473dd412ca72cb173e.tar.gz emacs-ed6281b066a0c183b3bdd8473dd412ca72cb173e.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/Makefile.in | 38 |
2 files changed, 7 insertions, 34 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dbcb185deb8..53d11c87a63 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,9 @@ | |||
| 3 | Reduce CPP usage. | 3 | Reduce CPP usage. |
| 4 | * Makefile.in (LIB_X11_LIB): Remove, inline in the only user. | 4 | * Makefile.in (LIB_X11_LIB): Remove, inline in the only user. |
| 5 | (obj): Use autoconf for unexec instead of cpp. | 5 | (obj): Use autoconf for unexec instead of cpp. |
| 6 | (C_SWITCH_SYSTEM, C_SWITCH_MACHINE, C_SWITCH_X_SITE): Remove | ||
| 7 | definitions and undefs. Inline definitions in the only user. | ||
| 8 | (ALL_CFLAGS): Substitute C_SWITCH_X_SYSTEM using autoconf. | ||
| 6 | 9 | ||
| 7 | 2010-04-27 Glenn Morris <rgm@gnu.org> | 10 | 2010-04-27 Glenn Morris <rgm@gnu.org> |
| 8 | 11 | ||
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@ | |||
| 77 | LIBXPM=@LIBXPM@ | 77 | LIBXPM=@LIBXPM@ |
| 78 | XFT_LIBS=@XFT_LIBS@ | 78 | XFT_LIBS=@XFT_LIBS@ |
| 79 | 79 | ||
| 80 | C_SWITCH_SYSTEM=@c_switch_system@ | ||
| 81 | C_SWITCH_MACHINE=@c_switch_machine@ | ||
| 82 | |||
| 83 | C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ | ||
| 84 | |||
| 85 | DBUS_CFLAGS = @DBUS_CFLAGS@ | 80 | DBUS_CFLAGS = @DBUS_CFLAGS@ |
| 86 | DBUS_LIBS = @DBUS_LIBS@ | 81 | DBUS_LIBS = @DBUS_LIBS@ |
| 87 | DBUS_OBJ = @DBUS_OBJ@ | 82 | DBUS_OBJ = @DBUS_OBJ@ |
| @@ -130,11 +125,6 @@ SHELL=/bin/sh | |||
| 130 | DEPFLAGS = -MMD -MF deps/$*.d | 125 | DEPFLAGS = -MMD -MF deps/$*.d |
| 131 | #endif | 126 | #endif |
| 132 | 127 | ||
| 133 | /* Undefine until the user can be moved in the non-cpp section. */ | ||
| 134 | #undef C_SWITCH_SYSTEM | ||
| 135 | #undef C_SWITCH_MACHINE | ||
| 136 | #undef C_SWITCH_X_SITE | ||
| 137 | |||
| 138 | /* Do not let the file name mktime.c get messed up. */ | 128 | /* Do not let the file name mktime.c get messed up. */ |
| 139 | #ifdef mktime | 129 | #ifdef mktime |
| 140 | #undef mktime | 130 | #undef mktime |
| @@ -196,18 +186,10 @@ DEPFLAGS = -MMD -MF deps/$*.d | |||
| 196 | #endif | 186 | #endif |
| 197 | 187 | ||
| 198 | /* These macros are for switches specifically related to X Windows. */ | 188 | /* These macros are for switches specifically related to X Windows. */ |
| 199 | #ifndef C_SWITCH_X_SYSTEM | ||
| 200 | #define C_SWITCH_X_SYSTEM | ||
| 201 | #endif | ||
| 202 | |||
| 203 | #ifndef LD_SWITCH_X_SITE | 189 | #ifndef LD_SWITCH_X_SITE |
| 204 | #define LD_SWITCH_X_SITE | 190 | #define LD_SWITCH_X_SITE |
| 205 | #endif | 191 | #endif |
| 206 | 192 | ||
| 207 | #ifndef LD_SWITCH_X_DEFAULT | ||
| 208 | #define LD_SWITCH_X_DEFAULT | ||
| 209 | #endif | ||
| 210 | |||
| 211 | STARTFILES = START_FILES | 193 | STARTFILES = START_FILES |
| 212 | 194 | ||
| 213 | 195 | ||
| @@ -231,13 +213,9 @@ shared=no | |||
| 231 | -DHAVE_CONFIG_H is needed for some other files to take advantage of | 213 | -DHAVE_CONFIG_H is needed for some other files to take advantage of |
| 232 | the information in ``config.h''. */ | 214 | the information in ``config.h''. */ |
| 233 | 215 | ||
| 234 | #undef C_SWITCH_MACHINE | ||
| 235 | #undef C_SWITCH_SYSTEM | ||
| 236 | #undef C_SWITCH_X_SITE | ||
| 237 | |||
| 238 | /* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM | 216 | /* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM |
| 239 | since it may have -I options that should override those two. */ | 217 | since it may have -I options that should override those two. */ |
| 240 | 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} | 218 | 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} |
| 241 | ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@ | 219 | ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@ |
| 242 | 220 | ||
| 243 | .SUFFIXES: .m | 221 | .SUFFIXES: .m |
| @@ -311,9 +289,7 @@ LIBXT=$(LIBW) $(LIBXSM) | |||
| 311 | #endif /* not USE_X_TOOLKIT */ | 289 | #endif /* not USE_X_TOOLKIT */ |
| 312 | 290 | ||
| 313 | #ifdef HAVE_X11 | 291 | #ifdef HAVE_X11 |
| 314 | /* LD_SWITCH_X_DEFAULT comes after everything else that specifies | 292 | X11_LDFLAGS = LD_SWITCH_X_SITE |
| 315 | options for where to find X libraries, but before those libraries. */ | ||
| 316 | X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT | ||
| 317 | LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) $(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS) | 293 | LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) $(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS) |
| 318 | #else /* not HAVE_X11 */ | 294 | #else /* not HAVE_X11 */ |
| 319 | LIBX= $(LIBXMENU) LD_SWITCH_X_SITE | 295 | LIBX= $(LIBXMENU) LD_SWITCH_X_SITE |
| @@ -840,17 +816,12 @@ stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU) | |||
| 840 | /* Supply an ordering for parallel make. */ | 816 | /* Supply an ordering for parallel make. */ |
| 841 | ../src/$(OLDXMENU): ${OLDXMENU} | 817 | ../src/$(OLDXMENU): ${OLDXMENU} |
| 842 | 818 | ||
| 843 | /* Encode the values of these two macros in Make variables, | ||
| 844 | so we can use $(...) to substitute their values within "...". */ | ||
| 845 | C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM | ||
| 846 | |||
| 847 | #ifdef USE_X_TOOLKIT | 819 | #ifdef USE_X_TOOLKIT |
| 848 | $(OLDXMENU): really-lwlib | 820 | $(OLDXMENU): really-lwlib |
| 849 | 821 | ||
| 850 | really-lwlib: | 822 | really-lwlib: |
| 851 | cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ | 823 | cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ |
| 852 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \ | 824 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' |
| 853 | "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" | ||
| 854 | @true /* make -t should not create really-lwlib. */ | 825 | @true /* make -t should not create really-lwlib. */ |
| 855 | .PHONY: really-lwlib | 826 | .PHONY: really-lwlib |
| 856 | #else /* not USE_X_TOOLKIT */ | 827 | #else /* not USE_X_TOOLKIT */ |
| @@ -858,8 +829,7 @@ $(OLDXMENU): really-oldXMenu | |||
| 858 | 829 | ||
| 859 | really-oldXMenu: | 830 | really-oldXMenu: |
| 860 | cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \ | 831 | cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \ |
| 861 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \ | 832 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' |
| 862 | "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" | ||
| 863 | @true /* make -t should not create really-oldXMenu. */ | 833 | @true /* make -t should not create really-oldXMenu. */ |
| 864 | .PHONY: really-oldXMenu | 834 | .PHONY: really-oldXMenu |
| 865 | #endif /* not USE_X_TOOLKIT */ | 835 | #endif /* not USE_X_TOOLKIT */ |