mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mkmf.rb: each_compile_rules
* lib/mkmf.rb (MakeMakefile#each_compile_rules): splat $(*VPATH*) for each VPATH elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3baef1fc22
commit
a0f7f36a5a
3 changed files with 23 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Nov 28 21:18:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (MakeMakefile#each_compile_rules): splat $(*VPATH*) for
|
||||
each VPATH elements.
|
||||
|
||||
Wed Nov 28 16:40:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* vm_core.h (enum rb_thread_status): remove THREAD_TO_KILL
|
||||
|
|
21
lib/mkmf.rb
21
lib/mkmf.rb
|
@ -1879,6 +1879,19 @@ all install static install-so install-rb: Makefile
|
|||
RULES
|
||||
end
|
||||
|
||||
def each_compile_rules
|
||||
vpath_splat = /\$\(\*VPATH\*\)/
|
||||
COMPILE_RULES.each do |rule|
|
||||
if vpath_splat =~ rule
|
||||
$VPATH.each do |path|
|
||||
yield rule.sub(vpath_splat) {path}
|
||||
end
|
||||
else
|
||||
yield rule
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Processes the data contents of the "depend" file. Each line of this file
|
||||
# is expected to be a file name.
|
||||
#
|
||||
|
@ -1889,7 +1902,7 @@ RULES
|
|||
depout = []
|
||||
cont = implicit = nil
|
||||
impconv = proc do
|
||||
COMPILE_RULES.each {|rule| depout << (rule % implicit[0]) << implicit[1]}
|
||||
each_compile_rules {|rule| depout << (rule % implicit[0]) << implicit[1]}
|
||||
implicit = nil
|
||||
end
|
||||
ruleconv = proc do |line|
|
||||
|
@ -2208,13 +2221,13 @@ site-install-rb: install-rb
|
|||
|
||||
compile_command = "\n\t$(ECHO) compiling $(<#{rsep})\n\t$(Q) %s\n\n"
|
||||
CXX_EXT.each do |e|
|
||||
COMPILE_RULES.each do |rule|
|
||||
each_compile_rules do |rule|
|
||||
mfile.printf(rule, e, $OBJEXT)
|
||||
mfile.printf(compile_command, COMPILE_CXX)
|
||||
end
|
||||
end
|
||||
C_EXT.each do |e|
|
||||
COMPILE_RULES.each do |rule|
|
||||
each_compile_rules do |rule|
|
||||
mfile.printf(rule, e, $OBJEXT)
|
||||
mfile.printf(compile_command, COMPILE_C)
|
||||
end
|
||||
|
@ -2297,7 +2310,7 @@ site-install-rb: install-rb
|
|||
$LIBPATH = []
|
||||
$INSTALLFILES = []
|
||||
$NONINSTALLFILES = [/~\z/, /\A#.*#\z/, /\A\.#/, /\.bak\z/i, /\.orig\z/, /\.rej\z/, /\.l[ao]\z/, /\.o\z/]
|
||||
$VPATH = %w[$(srcdir) $(arch_hdrdir)/ruby $(hdrdir)/ruby]
|
||||
$VPATH = %w[$(srcdir) $(topdir) $(arch_hdrdir)/ruby $(hdrdir)/ruby]
|
||||
|
||||
$objs = nil
|
||||
$srcs = nil
|
||||
|
|
|
@ -829,7 +829,7 @@ s,@LINK_SO@,@if exist $$(@).manifest $$(RM) $$(@:/=\).manifest,;t t
|
|||
!endif
|
||||
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tc$$(<:\=/),;t t
|
||||
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t
|
||||
s,@COMPILE_RULES@,{$$(hdrdir)}.%s.%s: {$$(topdir)}.%s.%s: {$$(srcdir)}.%s.%s: .%s.%s:,;t t
|
||||
s,@COMPILE_RULES@,{$$(*VPATH*)}.%s.%s: .%s.%s:,;t t
|
||||
s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t
|
||||
s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
|
||||
s,@COMMON_LIBS@,$(COMMON_LIBS),;t t
|
||||
|
|
Loading…
Reference in a new issue