We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ff40ad commit a8f3112Copy full SHA for a8f3112
lib/easy_compile/compilation_tasks.rb
@@ -106,9 +106,13 @@ def disable_shared
106
makefile_tasks.each do |task|
107
task.enhance do
108
makefile_content = File.read(task.name)
109
- makefile_content.sub!(/(LIBRUBYARG_SHARED = )(?:-l\$\(RUBY_SO_NAME\))(.*)/, '\1\2')
+ makefile_content.match(/LIBRUBYARG_SHARED = (.*)/) do |match|
110
+ shared_flags = match[1].split(" ")
111
+ shared_flags.reject! { |flag| flag == "-l$(RUBY_SO_NAME)" }
112
+ makefile_content.gsub!(/(LIBRUBYARG_SHARED = ).*/, "\\1#{shared_flags.join(' ')}")
113
- File.write(task.name, makefile_content)
114
+ File.write(task.name, makefile_content)
115
+ end
116
end
117
118
0 commit comments