Skip to content

Commit 63ed1af

Browse files
committed
Fix to use absolute path on creating depend
1 parent a7e20b5 commit 63ed1af

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

ext/numo/linalg/blas/depend.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
COGEN=ruby gen/cogen.rb -l
2-
GENDEPS=gen/*.rb tmpl/*.c
1+
COGEN=<%= "ruby #{__dir__}/gen/cogen.rb -l" %>
2+
GENDEPS=<%= "#{__dir__}/gen/*.rb #{__dir__}/tmpl/*.c" %>
33

44
<%
55
srcs = %w[s d c z].map{|c| [c, "blas_#{c}.c"]}

ext/numo/linalg/blas/extconf.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
end
3737

3838
create_site_conf
39-
create_depend
39+
create_depend(__dir__)
4040
create_makefile('numo/linalg/blas')

ext/numo/linalg/lapack/depend.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
COGEN=ruby gen/cogen.rb -l
2-
GENDEPS=gen/*.rb tmpl/*.c
1+
COGEN=<%= "ruby #{__dir__}/gen/cogen.rb -l" %>
2+
GENDEPS=<%= "#{__dir__}/gen/*.rb #{__dir__}/tmpl/*.c" %>
33

44
<%
55
srcs = %w[s d c z].map{|c| [c, "lapack_#{c}.c"]}

ext/numo/linalg/lapack/extconf.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
exit(1) unless have_func("LoadLibrary")
3737
end
3838

39-
create_depend
39+
create_depend(__dir__)
4040
create_makefile('numo/linalg/lapack')

ext/numo/linalg/mkmf_linalg.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ def find_libnarray_a
6969
end
7070
end
7171

72-
def create_depend
72+
def create_depend(base_dir)
7373
require 'erb'
7474
message "creating depend\n"
75-
dep_path = File.join(Dir.pwd, "depend")
75+
dep_path = "#{base_dir}/depend"
7676
File.open(dep_path, "w") do |dep|
77-
dep_erb_path = File.join(Dir.pwd, "depend.erb")
77+
dep_erb_path = "#{base_dir}/depend.erb"
7878
File.open(dep_erb_path, "r") do |dep_erb|
7979
erb = ERB.new(dep_erb.read)
8080
erb.filename = dep_erb_path

0 commit comments

Comments
 (0)