mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
define RUBY_DEBUG_ENV only for main.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
895954ef91
commit
0f4d856d4d
5 changed files with 14 additions and 4 deletions
|
@ -78,6 +78,7 @@ MISSING = @LIBOBJS@ @ALLOCA@
|
|||
LDSHARED = @LIBRUBY_LDSHARED@
|
||||
DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
|
||||
SOLIBS = @SOLIBS@
|
||||
ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@
|
||||
MAINLIBS = @MAINLIBS@
|
||||
ARCHMINIOBJS = @MINIOBJS@
|
||||
DLNOBJ = @DLNOBJ@
|
||||
|
@ -195,6 +196,8 @@ MINIPRELUDE_C = miniprelude.c
|
|||
PRELUDE_C = prelude.c
|
||||
RBCONFIG = .rbconfig.time
|
||||
|
||||
MAINSRC = $(MAINOBJ:@OBJEXT@=c)
|
||||
|
||||
SRC_FILE = $<
|
||||
OS_SRC_FILE = $<
|
||||
DEST_FILE = $@
|
||||
|
|
|
@ -938,6 +938,12 @@ $(PRELUDE_C): $(COMPILE_PRELUDE) \
|
|||
$(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
|
||||
$(srcdir)/template/prelude.c.tmpl golf_prelude.rb
|
||||
|
||||
MAINCPPFLAGS = $(ENABLE_DEBUG_ENV:yes=-DRUBY_DEBUG_ENV=1)
|
||||
|
||||
$(MAINOBJ): $(srcdir)/$(MAINSRC)
|
||||
$(ECHO) compiling $(srcdir)/$(MAINSRC)
|
||||
$(Q) $(CC) $(MAINCPPFLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(srcdir)/$(MAINSRC)
|
||||
|
||||
{$(VPATH)}probes.dmyh: {$(srcdir)}probes.d $(srcdir)/tool/gen_dummy_probes.rb
|
||||
|
||||
probes.dmyh:
|
||||
|
|
|
@ -4209,7 +4209,7 @@ AS_CASE(["$THREAD_MODEL"],
|
|||
|
||||
AC_ARG_ENABLE(debug-env,
|
||||
AS_HELP_STRING([--enable-debug-env], [enable RUBY_DEBUG environment variable]),
|
||||
[AC_DEFINE(RUBY_DEBUG_ENV)])
|
||||
[AC_SUBST(ENABLE_DEBUG_ENV, yes)])
|
||||
|
||||
AS_CASE(["$FIRSTMAKEFILE"], [*GNUmakefile:*], [gnumake=yes], [
|
||||
AC_MSG_CHECKING([if ${MAKE-make} is GNU make])
|
||||
|
|
3
main.c
3
main.c
|
@ -15,6 +15,9 @@
|
|||
#ifdef HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
#endif
|
||||
#if defined RUBY_DEBUG_ENV && !RUBY_DEBUG_ENV
|
||||
# undef RUBY_DEBUG_ENV
|
||||
#endif
|
||||
#ifdef RUBY_DEBUG_ENV
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
|
|
@ -364,6 +364,7 @@ OS_DEST_FILE = $(@:/=\)
|
|||
!if !defined(WINMAINOBJ)
|
||||
WINMAINOBJ = winmain.$(OBJEXT)
|
||||
!endif
|
||||
MAINSRC = $(MAINOBJ:.obj=.c)
|
||||
ARCHMINIOBJS = dmydln.$(OBJEXT) miniruby.res
|
||||
LIBOBJS = $(MISSING) $(LIBOBJS)
|
||||
|
||||
|
@ -772,9 +773,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
|||
!endif
|
||||
#define CANONICALIZATION_FOR_MATHN 1
|
||||
#define DEFAULT_KCODE KCODE_NONE
|
||||
!if "$(ENABLE_DEBUG_ENV)" == "yes"
|
||||
#define RUBY_DEBUG_ENV 1
|
||||
!endif
|
||||
#define LOAD_RELATIVE 1
|
||||
#define DLEXT ".so"
|
||||
!if "$(EXTSTATIC)" == "static"
|
||||
|
|
Loading…
Reference in a new issue