From 1020f7e3aaad9071d59df19c3377c3462af13f7c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 28 Jun 2020 14:12:26 +0900 Subject: Replace separators in input file name in header too --- tool/mk_builtin_loader.rb | 8 ++++---- 1 file 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 -- cgit v1.2.3