Skip to content

Commit 52f341b

Browse files
make install under build directory instead of rubies because it's intermediate
1 parent f806582 commit 52f341b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/ruby_wasm/build_system/product/crossruby.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,19 @@ def define_task
125125
sh %Q(ruby #{extinit_c_erb} #{@user_exts.map(&:name).join(" ")} | #{toolchain.cc} -c -x c - -o #{extinit_obj})
126126
end
127127

128+
install_dir = File.join(build_dir, "install")
128129
install =
129-
task "#{name}-install" => [@configure, extinit_task, dest_dir] do
130-
next if File.exist?("#{dest_dir}-install")
131-
sh "make install DESTDIR=#{dest_dir}-install", chdir: build_dir
130+
task install_dir => [@configure, extinit_task, dest_dir] do
131+
next if File.exist?(install_dir)
132+
sh "make install DESTDIR=#{install_dir}", chdir: build_dir
132133
end
133134

134135
desc "Build #{name}"
135136
task name => [@configure, install, dest_dir] do
136137
artifact = "rubies/ruby-#{name}.tar.gz"
137138
next if File.exist?(artifact)
138139
rm_rf dest_dir
139-
cp_r "#{dest_dir}-install", dest_dir
140+
cp_r install_dir, dest_dir
140141
@user_exts.each { |ext| ext.do_install_rb(self) }
141142
sh "tar cfz #{artifact} -C rubies #{name}"
142143
end

0 commit comments

Comments
 (0)