ruby-changes:46609
From: nobu <ko1@a...>
Date: Mon, 15 May 2017 16:04:53 +0900 (JST)
Subject: [ruby-changes:46609] nobu:r58724 (trunk): define RUBY_DEBUG_ENV only for main.c
nobu 2017-05-15 16:04:48 +0900 (Mon, 15 May 2017) New Revision: 58724 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58724 Log: define RUBY_DEBUG_ENV only for main.c Modified files: trunk/Makefile.in trunk/common.mk trunk/configure.in trunk/main.c trunk/win32/Makefile.sub Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 58723) +++ win32/Makefile.sub (revision 58724) @@ -364,6 +364,7 @@ OS_DEST_FILE = $(@:/=\) https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L364 !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/ https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L773 !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" Index: main.c =================================================================== --- main.c (revision 58723) +++ main.c (revision 58724) @@ -15,6 +15,9 @@ https://github.com/ruby/ruby/blob/trunk/main.c#L15 #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 Index: common.mk =================================================================== --- common.mk (revision 58723) +++ common.mk (revision 58724) @@ -938,6 +938,12 @@ $(PRELUDE_C): $(COMPILE_PRELUDE) \ https://github.com/ruby/ruby/blob/trunk/common.mk#L938 $(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: Index: configure.in =================================================================== --- configure.in (revision 58723) +++ configure.in (revision 58724) @@ -4209,7 +4209,7 @@ AS_CASE(["$THREAD_MODEL"], https://github.com/ruby/ruby/blob/trunk/configure.in#L4209 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]) Index: Makefile.in =================================================================== --- Makefile.in (revision 58723) +++ Makefile.in (revision 58724) @@ -78,6 +78,7 @@ MISSING = @LIBOBJS@ @ALLOCA@ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L78 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 https://github.com/ruby/ruby/blob/trunk/Makefile.in#L196 PRELUDE_C = prelude.c RBCONFIG = .rbconfig.time +MAINSRC = $(MAINOBJ:@OBJEXT@=c) + SRC_FILE = $< OS_SRC_FILE = $< DEST_FILE = $@ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/