summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-04-01 00:45:31 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-04-01 00:58:44 +0900
commitc2e3c8579ccb9b08e7d3f95356d06197e0d29eaa (patch)
tree9203877c82c7417b9dd7114a1dfe16e0bfa9623a /ext
parentbf9908d1698a8c485ee3715f65dd3bbeb5a3c487 (diff)
downloadpsych-c2e3c8579ccb9b08e7d3f95356d06197e0d29eaa.tar.gz
Output libyaml configure log
Diffstat (limited to 'ext')
-rw-r--r--ext/psych/extconf.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb
index 54aa730..ff8f61a 100644
--- a/ext/psych/extconf.rb
+++ b/ext/psych/extconf.rb
@@ -31,6 +31,7 @@ elsif yaml_source
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
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) ")