mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c93dd36e0e
commit
46ce7c436a
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Sat Nov 15 19:48:59 2014 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* 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@fsij.org>
|
||||
|
||||
* common.mk: Remove comments in Dependency lines.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue