Skip to content

Commit

Permalink
bpo-30411: Use --git-dir instead of -C to make git work under version…
Browse files Browse the repository at this point in the history
… below 1.8.5. (GH-8744)

(cherry picked from commit 4c85557)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
  • Loading branch information
miss-islington and zhangyangyu committed Aug 20, 2018
1 parent e77cdae commit 92970cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
20 changes: 4 additions & 16 deletions configure
Expand Up @@ -784,7 +784,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -896,7 +895,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -1149,15 +1147,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
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)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Expand Down Expand Up @@ -1295,7 +1284,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1448,7 +1437,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
Expand Down Expand Up @@ -2758,9 +2746,9 @@ HAS_GIT=no-repository
fi
if test $HAS_GIT = found
then
GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
GITTAG="git -C \$(srcdir) describe --all --always --dirty"
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
else
GITVERSION=""
GITTAG=""
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Expand Up @@ -37,9 +37,9 @@ HAS_GIT=no-repository
fi
if test $HAS_GIT = found
then
GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
GITTAG="git -C \$(srcdir) describe --all --always --dirty"
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
else
GITVERSION=""
GITTAG=""
Expand Down

0 comments on commit 92970cc

Please sign in to comment.