1
0
Fork 0
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:
nobu 2017-05-15 07:04:48 +00:00
parent 895954ef91
commit 0f4d856d4d
5 changed files with 14 additions and 4 deletions

View file

@ -78,6 +78,7 @@ MISSING = @LIBOBJS@ @ALLOCA@
LDSHARED = @LIBRUBY_LDSHARED@ LDSHARED = @LIBRUBY_LDSHARED@
DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG) DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
SOLIBS = @SOLIBS@ SOLIBS = @SOLIBS@
ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@
MAINLIBS = @MAINLIBS@ MAINLIBS = @MAINLIBS@
ARCHMINIOBJS = @MINIOBJS@ ARCHMINIOBJS = @MINIOBJS@
DLNOBJ = @DLNOBJ@ DLNOBJ = @DLNOBJ@
@ -195,6 +196,8 @@ MINIPRELUDE_C = miniprelude.c
PRELUDE_C = prelude.c PRELUDE_C = prelude.c
RBCONFIG = .rbconfig.time RBCONFIG = .rbconfig.time
MAINSRC = $(MAINOBJ:@OBJEXT@=c)
SRC_FILE = $< SRC_FILE = $<
OS_SRC_FILE = $< OS_SRC_FILE = $<
DEST_FILE = $@ DEST_FILE = $@

View file

@ -938,6 +938,12 @@ $(PRELUDE_C): $(COMPILE_PRELUDE) \
$(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
$(srcdir)/template/prelude.c.tmpl golf_prelude.rb $(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 {$(VPATH)}probes.dmyh: {$(srcdir)}probes.d $(srcdir)/tool/gen_dummy_probes.rb
probes.dmyh: probes.dmyh:

View file

@ -4209,7 +4209,7 @@ AS_CASE(["$THREAD_MODEL"],
AC_ARG_ENABLE(debug-env, AC_ARG_ENABLE(debug-env,
AS_HELP_STRING([--enable-debug-env], [enable RUBY_DEBUG environment variable]), 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], [ AS_CASE(["$FIRSTMAKEFILE"], [*GNUmakefile:*], [gnumake=yes], [
AC_MSG_CHECKING([if ${MAKE-make} is GNU make]) AC_MSG_CHECKING([if ${MAKE-make} is GNU make])

3
main.c
View file

@ -15,6 +15,9 @@
#ifdef HAVE_LOCALE_H #ifdef HAVE_LOCALE_H
#include <locale.h> #include <locale.h>
#endif #endif
#if defined RUBY_DEBUG_ENV && !RUBY_DEBUG_ENV
# undef RUBY_DEBUG_ENV
#endif
#ifdef RUBY_DEBUG_ENV #ifdef RUBY_DEBUG_ENV
#include <stdlib.h> #include <stdlib.h>
#endif #endif

View file

@ -364,6 +364,7 @@ OS_DEST_FILE = $(@:/=\)
!if !defined(WINMAINOBJ) !if !defined(WINMAINOBJ)
WINMAINOBJ = winmain.$(OBJEXT) WINMAINOBJ = winmain.$(OBJEXT)
!endif !endif
MAINSRC = $(MAINOBJ:.obj=.c)
ARCHMINIOBJS = dmydln.$(OBJEXT) miniruby.res ARCHMINIOBJS = dmydln.$(OBJEXT) miniruby.res
LIBOBJS = $(MISSING) $(LIBOBJS) LIBOBJS = $(MISSING) $(LIBOBJS)
@ -772,9 +773,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
!endif !endif
#define CANONICALIZATION_FOR_MATHN 1 #define CANONICALIZATION_FOR_MATHN 1
#define DEFAULT_KCODE KCODE_NONE #define DEFAULT_KCODE KCODE_NONE
!if "$(ENABLE_DEBUG_ENV)" == "yes"
#define RUBY_DEBUG_ENV 1
!endif
#define LOAD_RELATIVE 1 #define LOAD_RELATIVE 1
#define DLEXT ".so" #define DLEXT ".so"
!if "$(EXTSTATIC)" == "static" !if "$(EXTSTATIC)" == "static"