bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744)

This commit is contained in:
Xiang Zhang 2018-08-20 22:36:19 +08:00 committed by GitHub
parent 74a307d48e
commit 4c8555773a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 19 deletions

20
configure vendored
View File

@ -781,7 +781,6 @@ infodir
docdir docdir
oldincludedir oldincludedir
includedir includedir
runstatedir
localstatedir localstatedir
sharedstatedir sharedstatedir
sysconfdir sysconfdir
@ -891,7 +890,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc' sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com' sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var' localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include' includedir='${prefix}/include'
oldincludedir='/usr/include' oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@ -1144,15 +1142,6 @@ do
| -silent | --silent | --silen | --sile | --sil) | -silent | --silent | --silen | --sile | --sil)
silent=yes ;; silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;; ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@ -1290,7 +1279,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \ datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir libdir localedir mandir
do do
eval ac_val=\$$ac_var eval ac_val=\$$ac_var
# Remove trailing slashes. # Remove trailing slashes.
@ -1443,7 +1432,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var] --localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib] --libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include] --includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include] --oldincludedir=DIR C header files for non-gcc [/usr/include]
@ -2757,9 +2745,9 @@ HAS_GIT=no-repository
fi fi
if test $HAS_GIT = found if test $HAS_GIT = found
then then
GITVERSION="git -C \$(srcdir) rev-parse --short HEAD" GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
GITTAG="git -C \$(srcdir) describe --all --always --dirty" GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD" GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
else else
GITVERSION="" GITVERSION=""
GITTAG="" GITTAG=""

View File

@ -39,9 +39,9 @@ HAS_GIT=no-repository
fi fi
if test $HAS_GIT = found if test $HAS_GIT = found
then then
GITVERSION="git -C \$(srcdir) rev-parse --short HEAD" GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
GITTAG="git -C \$(srcdir) describe --all --always --dirty" GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD" GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
else else
GITVERSION="" GITVERSION=""
GITTAG="" GITTAG=""