diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-29 02:06:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-29 02:06:38 +0000 |
commit | 53e301a2d804919341b7012d58686edab5386116 (patch) | |
tree | 521812287802bc04a38f1cd16d73f028e0840b12 | |
parent | c02ffd9a8ff79324ae178adf41f5d18f3b4ca634 (diff) |
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
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | common.mk | 13 | ||||
-rw-r--r-- | template/fake.rb.in | 4 |
3 files changed, 8 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore index 0656e17945..36e2859c3c 100644 --- a/.gitignore +++ b/.gitignore @@ -106,7 +106,6 @@ y.tab.c /uncommon.mk /verconf.h /verconf.mk -/version.i /web /yasmdata.rb @@ -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 diff --git a/template/fake.rb.in b/template/fake.rb.in index fa7f1f79e1..f2cc7c65b6 100644 --- a/template/fake.rb.in +++ b/template/fake.rb.in @@ -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| |