diff --git a/ChangeLog b/ChangeLog index d05ae44843..1ae6576d43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Nov 15 19:48:59 2014 NAKAMURA Usaku + + * 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 * common.mk: Remove comments in Dependency lines. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 1eb52047a3..513dff3583 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -2051,7 +2051,10 @@ RULES 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