[前][次][番号順一覧][スレッド一覧]

ruby-changes:39338

From: nobu <ko1@a...>
Date: Wed, 29 Jul 2015 11:07:13 +0900 (JST)
Subject: [ruby-changes:39338] nobu:r51419 (trunk): common.mk: fix conflict of version.i

nobu	2015-07-29 11:06:38 +0900 (Wed, 29 Jul 2015)

  New Revision: 51419

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51419

  Log:
    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.

  Modified files:
    trunk/.gitignore
    trunk/common.mk
    trunk/template/fake.rb.in
Index: common.mk
===================================================================
--- common.mk	(revision 51418)
+++ common.mk	(revision 51419)
@@ -549,14 +549,13 @@ fake: $(CROSS_COMPILING)-fake https://github.com/ruby/ruby/blob/trunk/common.mk#L549
 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
Index: .gitignore
===================================================================
--- .gitignore	(revision 51418)
+++ .gitignore	(revision 51419)
@@ -106,7 +106,6 @@ y.tab.c https://github.com/ruby/ruby/blob/trunk/.gitignore#L106
 /uncommon.mk
 /verconf.h
 /verconf.mk
-/version.i
 /web
 /yasmdata.rb
 
Index: template/fake.rb.in
===================================================================
--- template/fake.rb.in	(revision 51418)
+++ template/fake.rb.in	(revision 51419)
@@ -5,8 +5,8 @@ while /\A(\w+)=(.*)/ =~ ARGV[0] https://github.com/ruby/ruby/blob/trunk/template/fake.rb.in#L5
   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|

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]