From 2043ab43e5e4750b23f0780c2ae672903426672f Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 1 Mar 2022 19:21:45 +0000 Subject: [PATCH] Prepare objdir before make ext --- Rakefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 0934ad7748..a481020ec0 100644 --- a/Rakefile +++ b/Rakefile @@ -189,10 +189,11 @@ namespace :build do raise "unknown target: #{params[:target]}" end make_args << %Q(RUBY_INCLUDE_FLAGS="-I#{src_dir}/include -I#{build.build_dir}/.ext/include/wasm32-wasi") - make_args << %Q(OBJDIR=#{build.ext_build_dir}) libs = BUILD_PROFILES[params[:profile]][:user_exts] libs.each do |lib| - make_cmd = %Q(make -C "#{base_dir}/ext/#{lib}" #{make_args.join(" ")} OBJDIR=#{build.ext_build_dir}/#{lib} obj) + objdir = "#{build.ext_build_dir}/#{lib}" + FileUtils.mkdir_p objdir + make_cmd = %Q(make -C "#{base_dir}/ext/#{lib}" #{make_args.join(" ")} OBJDIR=#{objdir} obj) sh make_cmd end mkdir_p File.dirname(build.extinit_obj)