diff options
author | Glenn Morris <rgm@gnu.org> | 2010-05-17 19:30:13 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2010-05-17 19:30:13 -0700 |
commit | be4ff9dad8bf43251f78f58a9ce86cf8bb153300 (patch) | |
tree | b61fdf0af5566b9a1fde833b4beb05df4e4be863 | |
parent | 5b5262f4da935f37376c548e31e234bf2073ebef (diff) | |
download | emacs-be4ff9dad8bf43251f78f58a9ce86cf8bb153300.tar.gz |
Define some malloc objects with configure, not cpp.
* configure.in (GMALLOC_OBJ, VMLIMIT_OBJ): New output variables.
* config.bat (GMALLOC_OBJ, VMLIMIT_OBJ): Edit to empty if sys_malloc.
* src/Makefile.in (GMALLOC_OBJ, VMLIMIT_OBJ): New, set by configure.
(gmallocobj, vmlimitobj): Replace with previous two variables.
(otherobj): Use $GMALLOC_OBJ, $VMLIMIT_OBJ.
* msdos/sed1v2.inp (GMALLOC_OBJ): Edit to gmalloc.o.
(VMLIMIT_OBJ): Edit to vm-limit.o.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | config.bat | 6 | ||||
-rw-r--r-- | configure.in | 11 | ||||
-rw-r--r-- | msdos/ChangeLog | 5 | ||||
-rw-r--r-- | msdos/sed1v2.inp | 2 | ||||
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/Makefile.in | 23 |
7 files changed, 44 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog index 88ddf0022a5..f100e0eeb2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-05-18 Glenn Morris <rgm@gnu.org> + + * config.bat (GMALLOC_OBJ, VMLIMIT_OBJ): Edit to empty if sys_malloc. + * configure.in (GMALLOC_OBJ, VMLIMIT_OBJ): New output variables. + 2010-05-17 Stefan Monnier <monnier@iro.umontreal.ca> * Makefile.in (src): Provide the name of the VCS file that witnesses diff --git a/config.bat b/config.bat index 953c5d64b12..35fef44b582 100644 --- a/config.bat +++ b/config.bat @@ -201,6 +201,12 @@ sed -f ../msdos/sed1x.inp <makefile.tmp >Makefile rm -f makefile.tmp
:src5
+if "%sys_malloc%" == "" goto src5a
+sed -e "/^GMALLOC_OBJ *=/s/gmalloc.o//" <Makefile >makefile.tmp
+sed -e "/^VMLIMIT_OBJ *=/s/vm-limit.o//" <makefile.tmp >Makefile
+rm -f makefile.tmp
+:src5a
+
if "%nodebug%" == "" goto src6
sed -e "/^CFLAGS *=/s/ *-gcoff//" <Makefile >makefile.tmp
sed -e "/^LDFLAGS *=/s/=/=-s/" <makefile.tmp >Makefile
diff --git a/configure.in b/configure.in index e667a5f1e05..86d3db67361 100644 --- a/configure.in +++ b/configure.in @@ -1592,11 +1592,20 @@ AC_CACHE_CHECK(whether __after_morecore_hook exists, if test $emacs_cv_var___after_morecore_hook = no; then doug_lea_malloc=no fi + if test "${system_malloc}" = "yes"; then GNU_MALLOC=no GNU_MALLOC_reason=" (The GNU allocators don't work with this system configuration.)" + GMALLOC_OBJ= + VMLIMIT_OBJ= +else + test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o + VMLIMIT_OBJ=vm-limit.o fi +AC_SUBST(GMALLOC_OBJ) +AC_SUBST(VMLIMIT_OBJ) + if test "$doug_lea_malloc" = "yes" ; then if test "$GNU_MALLOC" = yes ; then GNU_MALLOC_reason=" @@ -3208,7 +3217,7 @@ if test "$opsys" = "cygwin"; then else CYGWIN_OBJ= PRE_ALLOC_OBJ=lastfile.o - POST_ALLOC_OBJ="\$(vmlimitobj)" + POST_ALLOC_OBJ="\$(VMLIMIT_OBJ)" fi AC_SUBST(CYGWIN_OBJ) AC_SUBST(PRE_ALLOC_OBJ) diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 6763fcd6878..4ce549cfd8b 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,8 @@ +2010-05-18 Glenn Morris <rgm@gnu.org> + + * sed1v2.inp (GMALLOC_OBJ): Edit to gmalloc.o. + (VMLIMIT_OBJ): Edit to vm-limit.o. + 2010-05-17 Glenn Morris <rgm@gnu.org> * sed1v2.inp (OLDXMENU_DEPS): Edit to empty. diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index ac088cdcf86..906d558ed75 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -116,6 +116,8 @@ s/\.h\.in/.h-in/ /^OLDXMENU *=/s/@OLDXMENU@// /^LIBXMENU *=/s/@LIBXMENU@// /^LIBX_OTHER *=/s/@LIBX_OTHER@// +/^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/ +/^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/ /^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/ /^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/ /^UNEXEC_OBJ *=/s/@unexec@/unexec.o/ diff --git a/src/ChangeLog b/src/ChangeLog index eedd0474dc2..bb5d7e6d427 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-05-18 Glenn Morris <rgm@gnu.org> + + * Makefile.in (GMALLOC_OBJ, VMLIMIT_OBJ): New, set by configure. + (gmallocobj, vmlimitobj): Replace with previous two variables. + (otherobj): Use $GMALLOC_OBJ, $VMLIMIT_OBJ. + 2010-05-17 Glenn Morris <rgm@gnu.org> * Makefile.in (OLDXMENU_DEPS): New, set by configure. diff --git a/src/Makefile.in b/src/Makefile.in index 571fbf5b1b1..ff3726df6f8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -401,28 +401,25 @@ SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ w32.o w32console.o w32fns.o w32heap.o w32inevt.o \ w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_OBJ) -gmallocobj = -rallocobj = -vmlimitobj = -#ifndef SYSTEM_MALLOC -#ifndef DOUG_LEA_MALLOC -gmallocobj = gmalloc.o -#endif +/* gmalloc.o if !SYSTEM_MALLOC && !DOUG_LEA_MALLOC, else empty. */ +GMALLOC_OBJ=@GMALLOC_OBJ@ + +/* vm-limit.o if !SYSTEM_MALLOC, else empty. */ +VMLIMIT_OBJ=@VMLIMIT_OBJ@ -#ifdef REL_ALLOC +#if defined (REL_ALLOC) && ! defined (SYSTEM_MALLOC) rallocobj = ralloc.o +#else +rallocobj = #endif -vmlimitobj = vm-limit.o -#endif /* !SYSTEM_MALLOC */ - /* Empty on Cygwin, lastfile.o elsewhere. */ PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@ -/* lastfile.o vm-limit.o on Cygwin, $vmlimitobj elsewhere. */ +/* lastfile.o vm-limit.o on Cygwin, $VMLIMIT_OBJ elsewhere. */ POST_ALLOC_OBJ=@POST_ALLOC_OBJ@ /* List of object files that make-docfile should not be told about. */ -otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(gmallocobj) $(rallocobj) \ +otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(rallocobj) \ $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS) /* This is the platform-specific list of Lisp files loaded into the |