mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
68c9c97f13
commit
0ab20b48c5
5 changed files with 59 additions and 9 deletions
|
@ -172,6 +172,8 @@ IFCHANGE = $(srcdir)/tool/ifchange
|
||||||
SET_LC_MESSAGES = env LC_MESSAGES=C
|
SET_LC_MESSAGES = env LC_MESSAGES=C
|
||||||
OBJDUMP = @OBJDUMP@
|
OBJDUMP = @OBJDUMP@
|
||||||
OBJCOPY = @OBJCOPY@
|
OBJCOPY = @OBJCOPY@
|
||||||
|
HAVE_GIT = @HAVE_GIT@
|
||||||
|
GIT = @GIT@
|
||||||
VCS = @VCS@
|
VCS = @VCS@
|
||||||
VCSUP = @VCSUP@
|
VCSUP = @VCSUP@
|
||||||
DTRACE = @DTRACE@ @DTRACE_OPT@
|
DTRACE = @DTRACE@ @DTRACE_OPT@
|
||||||
|
|
|
@ -1078,9 +1078,11 @@ up::
|
||||||
|
|
||||||
after-update:: extract-extlibs
|
after-update:: extract-extlibs
|
||||||
|
|
||||||
update-remote:: update-src update-rubyspec update-download
|
update-remote:: update-src update-download $(HAVE_GIT:yes=)update-rubyspec
|
||||||
update-download:: update-unicode update-gems download-extlibs
|
update-download:: update-unicode update-gems download-extlibs
|
||||||
|
|
||||||
|
noupdate-rubyspec:
|
||||||
|
|
||||||
update-config_files: PHONY
|
update-config_files: PHONY
|
||||||
$(Q) $(BASERUBY) -C "$(srcdir)/tool" \
|
$(Q) $(BASERUBY) -C "$(srcdir)/tool" \
|
||||||
../tool/downloader.rb -e gnu \
|
../tool/downloader.rb -e gnu \
|
||||||
|
|
24
configure.in
24
configure.in
|
@ -58,6 +58,18 @@ fi
|
||||||
AC_SUBST(BASERUBY)
|
AC_SUBST(BASERUBY)
|
||||||
AC_SUBST(HAVE_BASERUBY)
|
AC_SUBST(HAVE_BASERUBY)
|
||||||
|
|
||||||
|
GIT=git
|
||||||
|
HAVE_GIT=yes
|
||||||
|
AC_ARG_WITH(git,
|
||||||
|
AS_HELP_STRING([--without-git], [never use git]),
|
||||||
|
[AS_CASE([$withval],
|
||||||
|
[no], [GIT=never-use HAVE_GIT=no],
|
||||||
|
[yes], [GIT=git],
|
||||||
|
[GIT=$withval])])
|
||||||
|
AS_IF([test x"$HAVE_GIT" = xyes], [command -v "$GIT" > /dev/null || HAVE_GIT=no])
|
||||||
|
AC_SUBST(GIT)
|
||||||
|
AC_SUBST(HAVE_GIT)
|
||||||
|
|
||||||
AC_DEFUN([RUBY_MINGW32],
|
AC_DEFUN([RUBY_MINGW32],
|
||||||
[AS_CASE(["$host_os"],
|
[AS_CASE(["$host_os"],
|
||||||
[cygwin*], [
|
[cygwin*], [
|
||||||
|
@ -4644,19 +4656,19 @@ AC_CONFIG_FILES(Makefile, [
|
||||||
:
|
:
|
||||||
elif svn info "$srcdir" > /dev/null 2>&1; then
|
elif svn info "$srcdir" > /dev/null 2>&1; then
|
||||||
VCS='svn'
|
VCS='svn'
|
||||||
elif git_dir=`git --work-tree="$srcdir" --git-dir="$srcdir/.git" rev-parse --git-dir 2>/dev/null`; then
|
elif git_dir=`$GIT --work-tree="$srcdir" --git-dir="$srcdir/.git" rev-parse --git-dir 2>/dev/null`; then
|
||||||
if test -d "$git_dir/svn"; then
|
if test -d "$git_dir/svn"; then
|
||||||
VCS='git svn'
|
VCS='$(GIT) svn'
|
||||||
else
|
else
|
||||||
VCS='git'
|
VCS='$(GIT)'
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
VCS='echo cannot'
|
VCS='echo cannot'
|
||||||
fi
|
fi
|
||||||
AS_CASE("$VCS",
|
AS_CASE("$VCS",
|
||||||
[svn], [VCSUP='$(VCS) up $(SVNUPOPTIONS)'],
|
[svn], [VCSUP='$(VCS) up $(SVNUPOPTIONS)'],
|
||||||
["git svn"], [VCSUP='$(VCS) rebase $(GITSVNREBASEOPTIONS)'],
|
['$(GIT) svn'], [VCSUP='$(VCS) rebase $(GITSVNREBASEOPTIONS)'],
|
||||||
[git], [VCSUP='$(VCS) pull $(GITPULLOPTIONS)'],
|
['$(GIT)'|git], [VCSUP='$(VCS) pull $(GITPULLOPTIONS)'],
|
||||||
[VCSUP='$(VCS)'])
|
[VCSUP='$(VCS)'])
|
||||||
sed -n \
|
sed -n \
|
||||||
-e '[/^@%:@define \(RUBY_RELEASE_[A-Z]*\) \([0-9][0-9]*\)/]{' \
|
-e '[/^@%:@define \(RUBY_RELEASE_[A-Z]*\) \([0-9][0-9]*\)/]{' \
|
||||||
|
|
|
@ -393,14 +393,34 @@ top_srcdir = $(srcdir)
|
||||||
hdrdir = $(srcdir)/include
|
hdrdir = $(srcdir)/include
|
||||||
VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(win_srcdir)
|
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)
|
!if exist($(srcdir)/.svn)
|
||||||
VCS = svn
|
VCS = svn
|
||||||
VCSUP = $(VCS) up $(SVNUPOPTIONS)
|
VCSUP = $(VCS) up $(SVNUPOPTIONS)
|
||||||
!else if exist($(srcdir)/.git/svn)
|
!else if exist($(srcdir)/.git/svn)
|
||||||
VCS = git svn
|
VCS = $(GIT) svn
|
||||||
VCSUP = $(VCS) rebase $(GITSVNREBASEOPTIONS)
|
VCSUP = $(VCS) rebase $(GITSVNREBASEOPTIONS)
|
||||||
!else if exist($(srcdir)/.git)
|
!else if exist($(srcdir)/.git)
|
||||||
VCS = git
|
VCS = $(GIT)
|
||||||
VCSUP = $(VCS) pull $(GITPULLOPTIONS)
|
VCSUP = $(VCS) pull $(GITPULLOPTIONS)
|
||||||
!else
|
!else
|
||||||
VCSUP = rem
|
VCSUP = rem
|
||||||
|
|
|
@ -41,6 +41,8 @@ if "%1" == "--path" goto :path
|
||||||
if "%1" == "--with-baseruby" goto :baseruby
|
if "%1" == "--with-baseruby" goto :baseruby
|
||||||
if "%1" == "--with-ntver" goto :ntver
|
if "%1" == "--with-ntver" goto :ntver
|
||||||
if "%1" == "--with-libdir" goto :libdir
|
if "%1" == "--with-libdir" goto :libdir
|
||||||
|
if "%1" == "--with-git" goto :git
|
||||||
|
if "%1" == "--without-git" goto :nogit
|
||||||
if "%1" == "--without-ext" goto :witharg
|
if "%1" == "--without-ext" goto :witharg
|
||||||
if "%1" == "--without-extensions" goto :witharg
|
if "%1" == "--without-extensions" goto :witharg
|
||||||
if "%opt:~0,10%" == "--without-" goto :withoutarg
|
if "%opt:~0,10%" == "--without-" goto :withoutarg
|
||||||
|
@ -179,6 +181,18 @@ goto :loop ;
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
|
:git
|
||||||
|
echo>> ~tmp~.mak "GIT=%~2" \
|
||||||
|
echo>>confargs.tmp %1=%2 \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop ;
|
||||||
|
:nogit
|
||||||
|
echo>> ~tmp~.mak "GIT=never-use" \
|
||||||
|
echo>> ~tmp~.mak "HAVE_GIT=no" \
|
||||||
|
echo>>confargs.tmp %1 \
|
||||||
|
shift
|
||||||
|
goto :loop ;
|
||||||
:witharg
|
:witharg
|
||||||
echo>>confargs.tmp %1=%2\
|
echo>>confargs.tmp %1=%2\
|
||||||
set witharg=1
|
set witharg=1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue