summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2021-01-31 15:08:37 +0900
committerKOBAYASHI Shuji <[email protected]>2021-01-31 15:08:37 +0900
commitd90abc648e69cf84defe0dc3d9b6f8663343fb8b (patch)
tree598812e3ac5df19b5e254b5777cc33acfef082af /lib
parent02e336ee27328a7215d7a41779006835331b15ef (diff)
downloadmruby-d90abc648e69cf84defe0dc3d9b6f8663343fb8b.tar.gz
mruby-d90abc648e69cf84defe0dc3d9b6f8663343fb8b.zip
Change `.o.d` back to `.d` because `.pi.d` is no longer created
Diffstat (limited to 'lib')
-rw-r--r--lib/mruby/build/command.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/mruby/build/command.rb b/lib/mruby/build/command.rb
index 9362a9d95..4e9f7297f 100644
--- a/lib/mruby/build/command.rb
+++ b/lib/mruby/build/command.rb
@@ -87,7 +87,7 @@ module MRuby
def run(outfile, infile, _defines=[], _include_paths=[], _flags=[])
mkdir_p File.dirname(outfile)
flags = all_flags(_defines, _include_paths, _flags)
- if File.extname(outfile) == build.exts.object
+ if object_ext?(outfile)
label = @label
opts = compile_options
else
@@ -157,8 +157,8 @@ module MRuby
# /src/value_array.h:
#
def get_dependencies(file)
- dep_file = "#{file}.d"
- return [MRUBY_CONFIG] unless File.exist?(dep_file)
+ dep_file = file.ext(".d")
+ return [MRUBY_CONFIG] unless object_ext?(file) && File.exist?(dep_file)
deps = File.read(dep_file).gsub("\\\n ", "").split("\n").map do |dep_line|
# dep_line:
@@ -172,6 +172,10 @@ module MRuby
end.flatten.uniq
deps << MRUBY_CONFIG
end
+
+ def object_ext?(path)
+ File.extname(path) == build.exts.object
+ end
end
class Command::Linker < Command