Change the filename like make variable

for consistency
This commit is contained in:
Takashi Kokubun 2020-03-22 23:15:50 -07:00
Родитель 3bd7d5617f
Коммит 13e9551b97
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 6FFC433B12EE23DD
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -227,9 +227,9 @@ 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
$(TIMESTAMPDIR)/$(arch)/.time $(srcdir)/tool/mjit_without_tabs.rb
$(ECHO) building $(@F:.time=.h)
$(Q) $(BASERUBY) $(srcdir)/tool/run_without_tabs.rb "$(MJIT_WITHOUT_TABS)" \
$(Q) $(BASERUBY) $(srcdir)/tool/mjit_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

Просмотреть файл

@ -32,14 +32,14 @@ flag, *command = ARGV
targets.each do |target|
next if flag != 'true'
unless File.writable?(target)
puts "tool/run_without_tabs.rb: Skipping #{target.dump} as it's not writable."
puts "tool/mjit_without_tabs.rb: Skipping #{target.dump} as it's not writable."
next
end
source = File.read(target)
begin
expanded = source.gsub(/^\t+/) { |tab| ' ' * 8 * tab.length }
rescue ArgumentError # invalid byte sequence in UTF-8 (Travis, RubyCI)
puts "tool/run_without_tabs.rb: Skipping #{target.dump} as the encoding is #{source.encoding}."
puts "tool/mjit_without_tabs.rb: Skipping #{target.dump} as the encoding is #{source.encoding}."
next
end
@ -47,7 +47,7 @@ targets.each do |target|
mtimes[target] = File.mtime(target)
if sources[target] == expanded
puts "#{target.dump} has no hard tab indentation. This should be ignored in tool/run_without_tabs.rb."
puts "#{target.dump} has no hard tab indentation. This should be ignored in tool/mjit_without_tabs.rb."
end
File.write(target, expanded)
FileUtils.touch(target, mtime: mtimes[target])