mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02: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@48435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
57682b05e1
commit
b5cda0ffb6
3 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Sat Nov 15 19:40:34 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>
|
Sat Nov 15 19:25:46 2014 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* common.mk: Remove comments in Dependency lines.
|
* common.mk: Remove comments in Dependency lines.
|
||||||
|
|
|
@ -2050,8 +2050,11 @@ RULES
|
||||||
suffixes << m[1] << m[2]
|
suffixes << m[1] << m[2]
|
||||||
implicit = [[m[1], m[2]], [m.post_match]]
|
implicit = [[m[1], m[2]], [m.post_match]]
|
||||||
next
|
next
|
||||||
elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
|
elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
|
||||||
line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\/\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2}
|
line.sub!(%r'(\s)*\#.*$', '')
|
||||||
|
comment = $& || ''
|
||||||
|
line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2}
|
||||||
|
line = line.chomp + comment + "\n"
|
||||||
end
|
end
|
||||||
depout << line
|
depout << line
|
||||||
end
|
end
|
||||||
|
|
|
@ -66,7 +66,7 @@ module Kernel
|
||||||
|
|
||||||
begin
|
begin
|
||||||
RUBYGEMS_ACTIVATION_MONITOR.exit
|
RUBYGEMS_ACTIVATION_MONITOR.exit
|
||||||
return gem_original_require(path)
|
return gem_original_require(spec.to_fullpath(path) || path)
|
||||||
end if spec
|
end if spec
|
||||||
|
|
||||||
# Attempt to find +path+ in any unresolved gems...
|
# Attempt to find +path+ in any unresolved gems...
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue