[前][次][番号順一覧][スレッド一覧]

ruby-changes:60484

From: Takashi <ko1@a...>
Date: Mon, 23 Mar 2020 15:13:39 +0900 (JST)
Subject: [ruby-changes:60484] d578f1d3ea (master): Change the run_without_tabs switching to dedicated

https://git.ruby-lang.org/ruby.git/commit/?id=d578f1d3ea

From d578f1d3ea317ef8d899d0fd9a4440ba67821d17 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sun, 22 Mar 2020 23:07:09 -0700
Subject: Change the run_without_tabs switching to dedicated

variable of make instead of d059714746 as requested.

You can disable this like `make MJIT_WITHOUT_TABS=false` or
`export MJIT_WITHOUT_TABS=false`.

diff --git a/common.mk b/common.mk
index ded8e70..8813037 100644
--- a/common.mk
+++ b/common.mk
@@ -221,12 +221,15 @@ mjit_config.h: Makefile https://github.com/ruby/ruby/blob/trunk/common.mk#L221
 # These rules using MJIT_HEADER_SUFFIX must be in common.mk, not
 # Makefile.in, in order to override the macro in defs/universal.mk.
 
+# Pass MJIT_WITHOUT_TABS=false to disable tool/run_without_tabs.rb
+MJIT_WITHOUT_TABS=true
+
 # Other `-Dxxx`s preceding `-DMJIT_HEADER` will be removed in transform_mjit_header.rb.
 # So `-DMJIT_HEADER` should be passed first when rb_mjit_header.h is generated.
 $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJEXT) \
 		$(TIMESTAMPDIR)/$(arch)/.time $(srcdir)/tool/run_without_tabs.rb
 	$(ECHO) building $(@F:.time=.h)
-	$(Q) $(BASERUBY) $(srcdir)/tool/run_without_tabs.rb $(MJIT_DEBUGFLAGS) -- \
+	$(Q) $(BASERUBY) $(srcdir)/tool/run_without_tabs.rb $(MJIT_WITHOUT_TABS) \
 		$(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new
 	$(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.h) $(@F:.time=.h).new
 
diff --git a/tool/run_without_tabs.rb b/tool/run_without_tabs.rb
index aa5fb7f..d1640c6 100644
--- a/tool/run_without_tabs.rb
+++ b/tool/run_without_tabs.rb
@@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/tool/run_without_tabs.rb#L1
 # frozen_string_literal: true
 # This is a script to run a command in ARGV, expanding tabs in some files
-# included by vm.c to normalize indentation of MJIT header when debugflags
-# is -ggdb3 (default).
+# included by vm.c to normalize indentation of MJIT header. You can disable
+# this feature by setting MJIT_WITHOUT_TABS=false make variable.
 #
 # Note that preprocessor of GCC converts a hard tab to one spaces, where
 # we expect it to be shown as 8 spaces. To obviate this script, we need
@@ -22,18 +22,15 @@ SKIPPED_FILES = %w[ https://github.com/ruby/ruby/blob/trunk/tool/run_without_tabs.rb#L22
   vm_opts.h
 ]
 
-unless split_index = ARGV.index('--')
-  abort "Usage: #{$0} [debugflags] -- [cmmand...]"
-end
-debugflags, command = ARGV[0...split_index], ARGV[(split_index + 1)..-1]
-
 srcdir = File.expand_path('..', __dir__)
 targets = EXPAND_TARGETS.flat_map { |t| Dir.glob(File.join(srcdir, t)) } - SKIPPED_FILES.map { |f| File.join(srcdir, f) }
 sources = {}
 mtimes = {}
 
+flag, *command = ARGV
+
 targets.each do |target|
-  next unless debugflags.include?('-ggdb3')
+  next if flag != 'true'
   unless File.writable?(target)
     puts "tool/run_without_tabs.rb: Skipping #{target.dump} as it's not writable."
     next
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]