Loading ...
Sorry, an error occurred while loading the content.
 

Confusing in Make_mvc.mak, Make_ming.mak for if_ruby.

Expand Messages
  • mattn
    Latest version of ruby is 1.9.3. This API version is 1.9.1 (different from ruby version). So, curently, we should specify RUBY_VER and RUBY_VER_LONG like
    Message 1 of 4 , Jan 26, 2012
      Latest version of ruby is 1.9.3. This API version is 1.9.1 (different from ruby version).
      So, curently, we should specify RUBY_VER and RUBY_VER_LONG like following on windows.

      ------
      MSVC:
      nmake -f Make_mvc.mak RUBY=c:/ruby193 DYNAMIC_RUBY=yes RUBY_VER=191 RUBY_VER_LONG=1.9.1

      MINGW32:
      mingw32-make -f Make_ming.mak RUBY=c:/ruby193 DYNAMIC_RUBY=yes RUBY_VER=191 RUBY_VER_LONG=1.9.1
      ------

      But, if_ruby is checking DYNAMIC_RUBY_VER (= RUBY_VER) like following.

      ------
      # if !defined(DYNAMIC_RUBY_VER) || (DYNAMIC_RUBY_VER < 18)
      ------

      DYNAMIC_RUBY_VER is specified 191 above which is greater than 19. This will make confusing.
      DYNAMIC_RUBY_VER/RUBY_VER must be 19. And name of dll "msvcrt-ruby$(RUBY_VER).dll" must not use RUBY_VER.
      Below is a patch. This don't change the way to build.

      diff -r 54d621a3b561 src/Make_ming.mak
      --- a/src/Make_ming.mak Thu Jan 26 20:58:26 2012 +0100
      +++ b/src/Make_ming.mak Fri Jan 27 09:19:27 2012 +0900
      @@ -269,6 +269,9 @@
       ifndef RUBY_VER_LONG
       RUBY_VER_LONG = 1.6
       endif
      +ifndef RUBY_API_VER
      +RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
      +endif
       
       ifndef RUBY_PLATFORM
       ifeq ($(RUBY_VER), 16)
      @@ -284,9 +287,9 @@
       
       ifndef RUBY_INSTALL_NAME
       ifeq ($(RUBY_VER), 16)
      -RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
      +RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
       else
      -RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
      +RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
       endif
       endif
       
      diff -r 54d621a3b561 src/Make_mvc.mak
      --- a/src/Make_mvc.mak Thu Jan 26 20:58:26 2012 +0100
      +++ b/src/Make_mvc.mak Fri Jan 27 09:19:27 2012 +0900
      @@ -805,28 +805,31 @@
       !ifndef RUBY_VER_LONG
       RUBY_VER_LONG = 1.8
       !endif
      +!ifndef RUBY_API_VER
      +RUBY_API_VER = $(RUBY_VER_LONG:.=)
      +!endif
       
       !if $(RUBY_VER) >= 18
       !ifndef RUBY_PLATFORM
       RUBY_PLATFORM = i386-mswin32
       !endif
       !ifndef RUBY_INSTALL_NAME
      -RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
      +RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
       !endif
       !else
       !ifndef RUBY_PLATFORM
       RUBY_PLATFORM = i586-mswin32
       !endif
       !ifndef RUBY_INSTALL_NAME
      -RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
      +RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
       !endif
       !endif # $(RUBY_VER) >= 18
       
       !message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
       CFLAGS = $(CFLAGS) -DFEAT_RUBY
       RUBY_OBJ = $(OUTDIR)\if_ruby.obj
      -!if $(RUBY_VER) >= 190
      -RUBY_INC = /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)"
      +!if $(RUBY_VER) >= 19
      +RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
       !else
       RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
       !endif


      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Bram Moolenaar
      ... Can you please also update the comments? They are unclear about what the command line arguments to make are exactly. It would be useful to give a couple
      Message 2 of 4 , Jan 28, 2012
        Yasuhiro Matsumoto wrote:

        > Latest version of ruby is 1.9.3. This API version is 1.9.1 (different from
        > ruby version).
        > So, curently, we should specify RUBY_VER and RUBY_VER_LONG like following
        > on windows.
        >
        > ------
        > MSVC:
        > nmake -f Make_mvc.mak RUBY=c:/ruby193 DYNAMIC_RUBY=yes RUBY_VER=191
        > RUBY_VER_LONG=1.9.1
        >
        > MINGW32:
        > mingw32-make -f Make_ming.mak RUBY=c:/ruby193 DYNAMIC_RUBY=yes RUBY_VER=191
        > RUBY_VER_LONG=1.9.1
        > ------
        >
        > But, if_ruby is checking DYNAMIC_RUBY_VER (= RUBY_VER) like following.
        >
        > ------
        > # if !defined(DYNAMIC_RUBY_VER) || (DYNAMIC_RUBY_VER < 18)
        > ------
        >
        > DYNAMIC_RUBY_VER is specified 191 above which is greater than 19. This will
        > make confusing.
        > DYNAMIC_RUBY_VER/RUBY_VER must be 19. And name of dll
        > "msvcrt-ruby$(RUBY_VER).dll" must not use RUBY_VER.
        > Below is a patch. This don't change the way to build.

        Can you please also update the comments? They are unclear about what
        the command line arguments to make are exactly. It would be useful to
        give a couple of examples at least.


        --
        hundred-and-one symptoms of being an internet addict:
        5. You find yourself brainstorming for new subjects to search.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • mattn
        Added comments. https://gist.github.com/1708979 https://raw.github.com/gist/1708979/gistfile1.diff diff -r 54d621a3b561 src/Make_ming.mak ... +++
        Message 3 of 4 , Jan 30, 2012
          Added comments.

          https://gist.github.com/1708979
          https://raw.github.com/gist/1708979/gistfile1.diff

          diff -r 54d621a3b561 src/Make_ming.mak
          --- a/src/Make_ming.mak Thu Jan 26 20:58:26 2012 +0100
          +++ b/src/Make_ming.mak Tue Jan 31 14:10:34 2012 +0900
          @@ -257,6 +257,8 @@
           #  RUBY_VER=[Ruby version, eg 16, 17] (default is 16)
           #  RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.6)
           #    You must set RUBY_VER_LONG when change RUBY_VER.
          +#    You must set ruby API version to RUBY_VER_LONG.
          +#    Don't set ruby API version to RUBY_VER like 191.
           #RUBY=c:/ruby
           ifdef RUBY
           ifndef DYNAMIC_RUBY
          @@ -269,6 +271,9 @@
           ifndef RUBY_VER_LONG
           RUBY_VER_LONG = 1.6
           endif
          +ifndef RUBY_API_VER
          +RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
          +endif
           
           ifndef RUBY_PLATFORM
           ifeq ($(RUBY_VER), 16)
          @@ -284,9 +289,9 @@
           
           ifndef RUBY_INSTALL_NAME
           ifeq ($(RUBY_VER), 16)
          -RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
          +RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
           else
          -RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
          +RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
           endif
           endif
           
          diff -r 54d621a3b561 src/Make_mvc.mak
          --- a/src/Make_mvc.mak Thu Jan 26 20:58:26 2012 +0100
          +++ b/src/Make_mvc.mak Tue Jan 31 14:10:34 2012 +0900
          @@ -63,6 +63,8 @@
           #  RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
           #  RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
           #    You must set RUBY_VER_LONG when change RUBY_VER.
          +#    You must set ruby API version to RUBY_VER_LONG.
          +#    Don't set ruby API version to RUBY_VER like 191.
           #
           # Tcl interface:
           #  TCL=[Path to Tcl directory]
          @@ -805,28 +807,31 @@
           !ifndef RUBY_VER_LONG
           RUBY_VER_LONG = 1.8
           !endif
          +!ifndef RUBY_API_VER
          +RUBY_API_VER = $(RUBY_VER_LONG:.=)
          +!endif
           
           !if $(RUBY_VER) >= 18
           !ifndef RUBY_PLATFORM
           RUBY_PLATFORM = i386-mswin32
           !endif
           !ifndef RUBY_INSTALL_NAME
          -RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
          +RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
           !endif
           !else
           !ifndef RUBY_PLATFORM
           RUBY_PLATFORM = i586-mswin32
           !endif
           !ifndef RUBY_INSTALL_NAME
          -RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
          +RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
           !endif
           !endif # $(RUBY_VER) >= 18
           
           !message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
           CFLAGS = $(CFLAGS) -DFEAT_RUBY
           RUBY_OBJ = $(OUTDIR)\if_ruby.obj
          -!if $(RUBY_VER) >= 190
          -RUBY_INC = /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)"
          +!if $(RUBY_VER) >= 19
          +RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
           !else
           RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
           !endif

          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Bram Moolenaar
          ... Thanks. One more for the todo list... -- hundred-and-one symptoms of being an internet addict: 23. You can t call your mother...she doesn t have a modem.
          Message 4 of 4 , Feb 1, 2012
            Yasuhiro Matsumoto wrote:

            > Added comments.
            >
            > https://gist.github.com/1708979
            > https://raw.github.com/gist/1708979/gistfile1.diff

            Thanks. One more for the todo list...


            --
            hundred-and-one symptoms of being an internet addict:
            23. You can't call your mother...she doesn't have a modem.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ an exciting new programming language -- http://www.Zimbu.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          Your message has been successfully submitted and would be delivered to recipients shortly.