From 07c15e8b108bf38848d2293d5a15c40fafb37d3b Mon Sep 17 00:00:00 2001 From: nagai Date: Sat, 30 Nov 2013 02:46:47 +0000 Subject: * ext/tk/extconf.rb: show the reason of why ignore tclConfig.sh/tkConfig.sh. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/extconf.rb | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'ext/tk') diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb index 0ef4104fc3..6e2ddb79e6 100644 --- a/ext/tk/extconf.rb +++ b/ext/tk/extconf.rb @@ -745,6 +745,7 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file] end conf = nil + progress_flag = false config_dir.uniq! config_dir.map{|dir| @@ -755,7 +756,7 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file] dir.strip.chomp('/') end }.each{|dir| - print(".") # progress + print("."); progress_flag = true # progress # print("check #{dir} ==>"); if dir.kind_of? Array tcldir, tkdir = dir @@ -795,18 +796,34 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file] # parse tclConfig.sh/tkConfig.sh tclconf = (tclpath)? parse_tclConfig(tclpath): nil if tclconf - next if tclver && ((tclver_major && tclver_major != tclconf['TCL_MAJOR_VERSION']) || (tclver_minor && tclver_minor != tclconf['TCL_MINOR_VERSION'])) - next if TkLib_Config['unsupported_versions'].find{|ver| - ver == "#{tclconf['TCL_MAJOR_VERSION']}.#{tclconf['TCL_MINOR_VERSION']}" - } + if tclver && ((tclver_major && tclver_major != tclconf['TCL_MAJOR_VERSION']) || (tclver_minor && tclver_minor != tclconf['TCL_MINOR_VERSION'])) + print("\n") if progress_flag + puts "Ignore \"#{tclpath}\" (unmatch with configured version)." + progress_flag = false + next + end + if TkLib_Config['unsupported_versions'].find{|ver| ver == "#{tclconf['TCL_MAJOR_VERSION']}.#{tclconf['TCL_MINOR_VERSION']}"} + print("\n") if progress_flag + puts "Ignore \"#{tclpath}\" (unsupported version of Tcl/Tk)." + progress_flag = false + next + end end tkconf = (tkpath)? parse_tclConfig(tkpath): nil if tkconf - next if tkver && ((tkver_major && tkver_major != tkconf['TK_MAJOR_VERSION']) || (tkver_minor && tkver_minor != tkconf['TK_MINOR_VERSION'])) - next if TkLib_Config['unsupported_versions'].find{|ver| - ver == "#{tkconf['TK_MAJOR_VERSION']}.#{tkconf['TK_MINOR_VERSION']}" - } + if tkver && ((tkver_major && tkver_major != tkconf['TK_MAJOR_VERSION']) || (tkver_minor && tkver_minor != tkconf['TK_MINOR_VERSION'])) + print("\n") if progress_flag + puts "Ignore \"#{tkpath}\" (unmatch with configured version)." + progress_flag = false + next + end + if TkLib_Config['unsupported_versions'].find{|ver| ver == "#{tkconf['TK_MAJOR_VERSION']}.#{tkconf['TK_MINOR_VERSION']}"} + print("\n") if progress_flag + puts "Ignore \"#{tkpath}\" (unsupported version of Tcl/Tk)." + progress_flag = false + next + end end # nativethread check -- cgit v1.2.3