mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
common.mk: fix conflict of version.i
* common.mk ($(arch)-fake.rb): read from STDIN instead of creating version.i, to get rid of conflict with tool/update-deps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c02ffd9a8f
commit
53e301a2d8
3 changed files with 8 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -106,7 +106,6 @@ y.tab.c
|
|||
/uncommon.mk
|
||||
/verconf.h
|
||||
/verconf.mk
|
||||
/version.i
|
||||
/web
|
||||
/yasmdata.rb
|
||||
|
||||
|
|
13
common.mk
13
common.mk
|
@ -549,14 +549,13 @@ fake: $(CROSS_COMPILING)-fake
|
|||
yes-fake: $(arch)-fake.rb $(RBCONFIG) PHONY
|
||||
no-fake -fake: PHONY
|
||||
|
||||
$(arch)-fake.rb: $(srcdir)/template/fake.rb.in $(srcdir)/tool/generic_erb.rb version.i
|
||||
$(ECHO) generating $@
|
||||
$(Q)$(exec) $(BOOTSTRAPRUBY) "$(srcdir)/tool/generic_erb.rb" -c -o $@ "$(srcdir)/template/fake.rb.in" \
|
||||
i=version.i srcdir="$(srcdir)" BASERUBY="$(BASERUBY)"
|
||||
|
||||
# .i really doesn't depend on .o, just ensure newer than headers which
|
||||
# really doesn't depend on .o, just ensure newer than headers which
|
||||
# version.o depends on.
|
||||
version.i: version.$(OBJEXT)
|
||||
$(arch)-fake.rb: $(srcdir)/template/fake.rb.in $(srcdir)/tool/generic_erb.rb version.$(OBJEXT)
|
||||
$(ECHO) generating $@
|
||||
$(Q) $(CPP) $(warnflags) $(XCFLAGS) $(CPPFLAGS) "$(srcdir)/version.c" | \
|
||||
$(BOOTSTRAPRUBY) "$(srcdir)/tool/generic_erb.rb" -o $@ "$(srcdir)/template/fake.rb.in" \
|
||||
i=- srcdir="$(srcdir)" BASERUBY="$(BASERUBY)"
|
||||
|
||||
btest: $(TEST_RUNNABLE)-btest
|
||||
no-btest: PHONY
|
||||
|
|
|
@ -5,8 +5,8 @@ while /\A(\w+)=(.*)/ =~ ARGV[0]
|
|||
arg[$1].tr!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
||||
ARGV.shift
|
||||
end
|
||||
if arg['i']
|
||||
src = File.read(arg['i'])
|
||||
if inc = arg['i']
|
||||
src = inc == '-' ? STDIN.read : File.read(inc)
|
||||
arg['versions'] = version = {}
|
||||
File.read(File.join(arg['srcdir'], 'version.c')).
|
||||
scan(/rb_define_global_const\("(RUBY_\w+)",[^;]*?\bMK(?:INT|STR)\(([^()]*)\)/m) do |n, v|
|
||||
|
|
Loading…
Add table
Reference in a new issue