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

ruby-changes:26834

From: nobu <ko1@a...>
Date: Sun, 20 Jan 2013 22:24:44 +0900 (JST)
Subject: [ruby-changes:26834] nobu:r38886 (trunk): vpath.rb: hack for msys make

nobu	2013-01-20 22:24:31 +0900 (Sun, 20 Jan 2013)

  New Revision: 38886

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

  Log:
    vpath.rb: hack for msys make
    
    * tool/vpath.rb (VPath#def_options): hack for msys make, which
      converts a command line argument to non-msys command seems like a
      path list automagically.  [Bug #7710] [ruby-core:51489]

  Modified files:
    trunk/ChangeLog
    trunk/common.mk
    trunk/ext/ripper/depend
    trunk/lib/mkmf.rb
    trunk/tool/vpath.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38885)
+++ ChangeLog	(revision 38886)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jan 20 22:24:28 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* tool/vpath.rb (VPath#def_options): hack for msys make, which
+	  converts a command line argument to non-msys command seems like a
+	  path list automagically.  [Bug #7710] [ruby-core:51489]
+
 Sat Jan 19 11:35:00 2013  Zachary Scott  <zachary@z...>
 
 	* struct.c (Struct.new): Document Struct.new with block
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 38885)
+++ lib/mkmf.rb	(revision 38886)
@@ -1759,6 +1759,7 @@ srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\ https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1759
 topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).unspace}
 hdrdir = #{mkintpath(CONFIG["hdrdir"]).unspace}
 arch_hdrdir = #{$arch_hdrdir.quote}
+PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']}
 VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
 }
     if $extmk
Index: common.mk
===================================================================
--- common.mk	(revision 38885)
+++ common.mk	(revision 38886)
@@ -575,7 +575,7 @@ PHONY: https://github.com/ruby/ruby/blob/trunk/common.mk#L575
 
 {$(srcdir)}.y.c:
 	$(ECHO) generating $@
-	$(Q)$(BASERUBY) $(srcdir)/tool/id2token.rb --path-separator=$(PATH_SEPARATOR) --vpath=$(VPATH) id.h $(SRC_FILE) > parse.tmp.y
+	$(Q)$(BASERUBY) $(srcdir)/tool/id2token.rb --path-separator=.$(PATH_SEPARATOR)./ --vpath=$(VPATH) id.h $(SRC_FILE) > parse.tmp.y
 	$(Q)$(YACC) -d $(YFLAGS) -o y.tab.c parse.tmp.y
 	$(Q)$(RM) parse.tmp.y
 	$(Q)sed -f $(srcdir)/tool/ytab.sed -e "/^#/s!parse\.tmp\.[iy]!parse.y!" -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
Index: ext/ripper/depend
===================================================================
--- ext/ripper/depend	(revision 38885)
+++ ext/ripper/depend	(revision 38886)
@@ -25,7 +25,7 @@ static: check https://github.com/ruby/ruby/blob/trunk/ext/ripper/depend#L25
 
 ripper.y: $(srcdir)/tools/preproc.rb $(top_srcdir)/parse.y
 	$(ECHO) extracting $@ from $(top_srcdir)/parse.y
-	$(Q) $(RUBY) $(top_srcdir)/tool/id2token.rb --vpath=$(VPATH) id.h $(top_srcdir)/parse.y > ripper.tmp.y
+	$(Q) $(RUBY) $(top_srcdir)/tool/id2token.rb --path-separator=.$(PATH_SEPARATOR)./ --vpath=$(VPATH) id.h $(top_srcdir)/parse.y > ripper.tmp.y
 	$(Q) $(RUBY) $(srcdir)/tools/preproc.rb ripper.tmp.y --output=$@
 	$(Q) $(RM) ripper.tmp.y
 
Index: tool/vpath.rb
===================================================================
--- tool/vpath.rb	(revision 38885)
+++ tool/vpath.rb	(revision 38886)
@@ -59,8 +59,9 @@ class VPath https://github.com/ruby/ruby/blob/trunk/tool/vpath.rb#L59
     opt.on("-L", "--vpath=PATH LIST", "add directories to search path") {|dirs|
       @additional << [dirs]
     }
-    opt.on("--path-separator=SEP", /\A\W\z/, "separator for vpath") {|sep|
-      @separator = sep
+    opt.on("--path-separator=SEP", /\A(?:\W\z|\.(\W).+)/, "separator for vpath") {|sep, vsep|
+      # hack for msys make.
+      @separator = vsep || sep
     }
   end
 

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

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