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

ruby-changes:60469

From: Takashi <ko1@a...>
Date: Sun, 22 Mar 2020 16:53:33 +0900 (JST)
Subject: [ruby-changes:60469] 91acdd17c4 (master): Revert "Expand tabs for rb_mjit_header.h"

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

From 91acdd17c4b4bb69a8fa3ada46e09dad46b9362e Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sun, 22 Mar 2020 00:53:05 -0700
Subject: Revert "Expand tabs for rb_mjit_header.h"

This reverts commit 57119dd561418c917b885db5f5af7f129a96d1ec.

Temporarily reverting for Travis failures

diff --git a/common.mk b/common.mk
index 2593713..8182eb7 100644
--- a/common.mk
+++ b/common.mk
@@ -224,10 +224,9 @@ mjit_config.h: Makefile https://github.com/ruby/ruby/blob/trunk/common.mk#L224
 # 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
+		$(TIMESTAMPDIR)/$(arch)/.time
 	$(ECHO) building $(@F:.time=.h)
-	$(Q) $(BASERUBY) $(srcdir)/tool/run_without_tabs.rb \
-		$(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new
+	$(Q) $(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
 
 $(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).h: $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time
diff --git a/tool/run_without_tabs.rb b/tool/run_without_tabs.rb
deleted file mode 100644
index 0ac21f9..0000000
--- a/tool/run_without_tabs.rb
+++ /dev/null
@@ -1,35 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/common.mk#L0
-# 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.
-#
-# 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
-# to convert all tabs to spaces in these files.
-
-require 'fileutils'
-
-srcdir = File.expand_path('..', __dir__)
-targets = Dir.glob(File.join(srcdir, 'vm*.*'))
-sources = {}
-mtimes = {}
-
-targets.each do |target|
-  sources[target] = File.read(target)
-  mtimes[target] = File.mtime(target)
-
-  expanded = sources[target].gsub(/^\t+/) { |tab| ' ' * 8 * tab.length }
-  if sources[target] == expanded
-    puts "#{target.dump} has no hard tab indentation. This should be ignored in tool/run_without_tabs.rb."
-  end
-  File.write(target, expanded)
-  FileUtils.touch(target, mtime: mtimes[target])
-end
-
-result = system(*ARGV)
-
-targets.each do |target|
-  File.write(target, sources.fetch(target))
-  FileUtils.touch(target, mtime: mtimes.fetch(target))
-end
-
-exit result
-- 
cgit v0.10.2


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

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