ruby-changes:36356
From: usa <ko1@a...>
Date: Sat, 15 Nov 2014 19:51:16 +0900 (JST)
Subject: [ruby-changes:36356] usa:r48437 (trunk): * lib/mkmf.rb (depend_rules): support comments during a line.
usa 2014-11-15 19:51:11 +0900 (Sat, 15 Nov 2014) New Revision: 48437 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48437 Log: * lib/mkmf.rb (depend_rules): support comments during a line. * lib/mkmf.rb (depend_rules): apply RULE_SUBST even if the dependency file contains path. Modified files: trunk/ChangeLog trunk/lib/mkmf.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 48436) +++ ChangeLog (revision 48437) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Nov 15 19:48:59 2014 NAKAMURA Usaku <usa@r...> + + * lib/mkmf.rb (depend_rules): support comments during a line. + + * lib/mkmf.rb (depend_rules): apply RULE_SUBST even if the dependency + file contains path. + Sat Nov 15 19:25:46 2014 Tanaka Akira <akr@f...> * common.mk: Remove comments in Dependency lines. Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 48436) +++ lib/mkmf.rb (revision 48437) @@ -2051,7 +2051,10 @@ RULES https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2051 implicit = [[m[1], m[2]], [m.post_match]] next elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line - line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\/\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2} + line.sub!(/\s*\#.*$/, '') + comment = $& + line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2} + line = line.chomp + comment + "\n" if comment end depout << line end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/