[前][次][番号順一覧][スレッド一覧]

ruby-changes:71584

From: Nobuyoshi <ko1@a...>
Date: Fri, 1 Apr 2022 11:49:07 +0900 (JST)
Subject: [ruby-changes:71584] e680e63e7e (master): [ruby/psych] Output libyaml configure log

https://git.ruby-lang.org/ruby.git/commit/?id=e680e63e7e

From e680e63e7ea79657e06d7c4609720c6ee06442b8 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 1 Apr 2022 00:45:31 +0900
Subject: [ruby/psych] Output libyaml configure log

https://github.com/ruby/psych/commit/c2e3c8579c
---
 ext/psych/extconf.rb | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb
index 54aa730f44..ff8f61a450 100644
--- a/ext/psych/extconf.rb
+++ b/ext/psych/extconf.rb
@@ -31,6 +31,7 @@ elsif yaml_source https://github.com/ruby/ruby/blob/trunk/ext/psych/extconf.rb#L31
   yaml_source = yaml_source.gsub(/\$\((\w+)\)|\$\{(\w+)\}/) {ENV[$1||$2]}
 end
 if yaml_source
+  yaml_source = yaml_source.chomp("/")
   yaml_configure = "#{File.expand_path(yaml_source)}/configure"
   unless File.exist?(yaml_configure)
     raise "Configure script not found in #{yaml_source.quote}"
@@ -40,17 +41,19 @@ if yaml_source https://github.com/ruby/ruby/blob/trunk/ext/psych/extconf.rb#L41
   yaml = "libyaml"
   Dir.mkdir(yaml) unless File.directory?(yaml)
   shared = $enable_shared || !$static
-  unless system(yaml_configure, "-q",
-                "--enable-#{shared ? 'shared' : 'static'}",
-                "--host=#{RbConfig::CONFIG['host'].sub(/-unknown-/, '-')}",
-                *(["CFLAGS=-w"] if RbConfig::CONFIG["GCC"] == "yes"),
-                chdir: yaml)
+  args = [
+    yaml_configure,
+    "--enable-#{shared ? 'shared' : 'static'}",
+    "--host=#{RbConfig::CONFIG['host'].sub(/-unknown-/, '-')}",
+    *(["CFLAGS=-w"] if RbConfig::CONFIG["GCC"] == "yes"),
+  ]
+  puts(args.quote.join(' '))
+  unless system(*args, chdir: yaml)
     raise "failed to configure libyaml"
   end
-  Logging.message("libyaml configured\n")
   inc = yaml_source.start_with?("#$srcdir/") ? "$(srcdir)#{yaml_source[$srcdir.size..-1]}" : yaml_source
   $INCFLAGS << " -I#{yaml}/include -I#{inc}/include"
-  Logging.message("INCLFAG=#$INCLFAG\n")
+  puts("INCFLAGS=#$INCFLAGS")
   libyaml = "libyaml.#$LIBEXT"
   $cleanfiles << libyaml
   $LOCAL_LIBS.prepend("$(LIBYAML) ")
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]