aboutsummaryrefslogtreecommitdiffstats
path: root/win32/Makefile.sub
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-10 01:22:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-10 01:22:48 +0000
commit80b13631bc16be93911287e227b1e4bf719b8fac (patch)
tree8081923505b44728cfb13d183fad21662ce76e06 /win32/Makefile.sub
parent68bc69bd8146dc128e920073520d728cc1f3feb7 (diff)
downloadruby-80b13631bc16be93911287e227b1e4bf719b8fac.tar.gz
Add --with-git option
* configure.in, win32/configure.bat: add --with-git option to tell git command to use, or not to use git. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/Makefile.sub')
-rw-r--r--win32/Makefile.sub24
1 files changed, 22 insertions, 2 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index ffccd1422c..8bf9077484 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -393,14 +393,34 @@ top_srcdir = $(srcdir)
hdrdir = $(srcdir)/include
VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(win_srcdir)
+!ifndef GIT
+GIT = git
+!endif
+!if "$(HAVE_GIT)" == "yes" || "$(HAVE_GIT)" == "no"
+!else if "$(GIT)" == ""
+HAVE_GIT = no
+!else if [for %I in ($(GIT)) @if not "%~xI" == "" exit 1]
+! if [for %I in ($(GIT)) @if not "%~$PATH:I" == "" exit 1]
+HAVE_GIT = yes
+! else
+HAVE_GIT = no
+! endif
+!else
+! if [for %x in (%PATHEXT:;= %) do @for %I in ($(GIT)%x) do @if not "%~$PATH:I" == . exit 1]
+HAVE_GIT = yes
+! else
+HAVE_GIT = no
+! endif
+!endif
+
!if exist($(srcdir)/.svn)
VCS = svn
VCSUP = $(VCS) up $(SVNUPOPTIONS)
!else if exist($(srcdir)/.git/svn)
-VCS = git svn
+VCS = $(GIT) svn
VCSUP = $(VCS) rebase $(GITSVNREBASEOPTIONS)
!else if exist($(srcdir)/.git)
-VCS = git
+VCS = $(GIT)
VCSUP = $(VCS) pull $(GITPULLOPTIONS)
!else
VCSUP = rem