summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-28 14:12:26 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-28 14:12:26 +0900
commit1020f7e3aaad9071d59df19c3377c3462af13f7c (patch)
tree7567b39adc3432004d06c10d432402121d955296
parent44a659ad976221cfec3355e036daeb4e4942db55 (diff)
Replace separators in input file name in header too
-rw-r--r--tool/mk_builtin_loader.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb
index fbed9fa335..16956c6b92 100644
--- a/tool/mk_builtin_loader.rb
+++ b/tool/mk_builtin_loader.rb
@@ -200,6 +200,10 @@ def mk_builtin_header file
f = open(File.basename(ofile), 'w')
end
begin
+ if File::ALT_SEPARATOR
+ file = file.tr(File::ALT_SEPARATOR, File::SEPARATOR)
+ ofile = ofile.tr(File::ALT_SEPARATOR, File::SEPARATOR)
+ end
f.puts "// -*- c -*-"
f.puts "// DO NOT MODIFY THIS FILE DIRECTLY."
f.puts "// auto-generated file"
@@ -213,10 +217,6 @@ def mk_builtin_header file
f.puts
lineno = 11
line_file = file
- if File::ALT_SEPARATOR
- line_file = line_file.tr(File::ALT_SEPARATOR, File::SEPARATOR)
- ofile = ofile.tr(File::ALT_SEPARATOR, File::SEPARATOR)
- end
inlines.each{|cfunc_name, (body_lineno, text, params, func_name)|
if String === cfunc_name