On 2012-09-18 21:21, Peter Rosin wrote:
> On 2012-09-18 16:44, Gary V. Vaughan wrote:
>> Hi Bob,
>>
>> On 18 ก.ย. 2012, at 21:23, Bob Friesenhahn <[email protected]>
>> wrote:
>>> It used to be possible to run the libtool test suite in a MSYS shell
>>> using a CIFS mount of the same source tree that I use for my Unix type
>>> systems. I used to do that on a periodic basis. Since the bootstrap
>>> improvements, this does not seem to be possible. Perhaps I might
>>> encounter a MSYS install which includes the newer m4 and a workable 'git'.
>>
>> I'd like to fix that.
>
> What used to work was this:
>
> In Cygwin:
>
> cd to the libtool dir
> git checkout master
> ./bootstrap --copy
> mkdir ../cygwin
> cd ../cygwin
> ../libtool/configure
> make
> make check
>
> Then in MSYS:
>
> cd to the libtool dir
> mkdir ../mingw
> cd ../mingw
> ../libtool/configure
> make
> make check
>
>
>
> The above now misbehaves in the "make" step, with:
>
> /bin/sh: line 13: git: command not found
> /bin/sed -e s|@MACRO_VERSION\@|2.4.2.176-30304|g -e
> s|@MACRO_REVISION\@|UNKNOWN|g -e s|@MACRO_SERIAL\@|0|g -e
> s|@PACKAGE\@|libtool|g -e s|@PACKAGE_BUGREPORT\@|[email protected]|g -e
> s|@PACKAGE_URL\@|http://www.gnu.org/software/libtool/|g -e
> s|@PACKAGE_NAME\@|GNU Libtool|g -e s|@package_revision\@|UNKNOWN|g -e
> s|@PACKAGE_STRING\@|GNU Libtool 2.4.2.176-30304|g -e
> s|@PACKAGE_TARNAME\@|libtool|g -e s|@PACKAGE_VERSION\@|2.4.2.176-30304|g -e
> s|@VERSION\@|2.4.2.176-30304|g '../libtool/m4/ltversion.in' >
> '../libtool/m4/ltversion.m4'
> CDPATH="${ZSH_VERSION+.}:" && cd ../libtool && /bin/sh
> /c/Cygwin/home/peda/libtool/git/libtool/build-aux/missing --run aclocal-1.11
> -I m4
> cd ../libtool && /bin/sh
> /c/Cygwin/home/peda/libtool/git/libtool/build-aux/missing --run automake-1.11
> --gnu
> CDPATH="${ZSH_VERSION+.}:" && cd ../libtool && /bin/sh
> /c/Cygwin/home/peda/libtool/git/libtool/build-aux/missing --run autoconf
> /bin/sh ./config.status --recheck
> ...
The below appears to fix at least some issues for me. Maybe
--fallback is sane to add to more git-version-gen invocations?
Cheers,
Peter
--- gnulib/build-aux/git-version-gen 2012-09-18 19:09:51.962446500 +0200
+++ build-aux/git-version-gen 2012-09-18 23:11:00.722895100 +0200
@@ -86,6 +86,7 @@
Options:
--prefix prefix of git tags (default 'v')
+ --fallback fallback version to use if \"git --version\" fails
--help display this help and exit
--version output version information and exit
@@ -93,12 +94,14 @@
Running without arguments will suffice in most cases."
prefix=v
+fallback=
while test $# -gt 0; do
case $1 in
--help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;;
--prefix) shift; prefix="$1";;
+ --fallback) shift; fallback="$1";;
-*)
echo "$0: Unknown option '$1'." >&2
echo "$0: Try '--help' for more information." >&2
@@ -184,8 +187,10 @@
# Remove the "g" in git describe's output string, to save a byte.
v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
v_from_git=1
-else
+elif test -z "$fallback" || git --version >& /dev/null; then
v=UNKNOWN
+else
+ v=$fallback
fi
v=`echo "$v" |sed "s/^$prefix//"`
--- gnulib/top/maint.mk 2012-09-18 19:09:55.207252200 +0200
+++ maint.mk 2012-09-18 23:43:31.314929500 +0200
@@ -1327,7 +1327,7 @@
.PHONY: no-submodule-changes
no-submodule-changes:
- $(AM_V_GEN)if test -d $(srcdir)/.git; then \
+ $(AM_V_GEN)if test -d $(srcdir)/.git && git --version >& /dev/null;
then \
diff=$$(cd $(srcdir) && git submodule -q foreach \
git diff-index --name-only HEAD) \
|| exit 1; \
@@ -1345,7 +1345,7 @@
# cannot be built from a fresh clone.
.PHONY: public-submodule-commit
public-submodule-commit:
- $(AM_V_GEN)if test -d $(srcdir)/.git; then \
+ $(AM_V_GEN)if test -d $(srcdir)/.git && git --version >& /dev/null;
then \
cd $(srcdir) && \
git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \
= '$$(git merge-base origin $$sha1)' \
diff --git a/Makefile.am b/Makefile.am
index 359b394..44a885b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -50,7 +50,7 @@ LT_M4SH = $(M4SH) -B
'$(srcdir)/$(m4sh_dir)'
# Using `cd' in backquotes may print the directory name, use this instead:
lt__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-git_version_gen = '$(SHELL)' '$(aux_dir)/git-version-gen' '.tarball-version'
+git_version_gen = '$(SHELL)' '$(aux_dir)/git-version-gen' '--fallback'
'$(VERSION)' '.tarball-version'
rebuild = rebuild=:; revision=`$(lt__cd) $(srcdir) && $(git_version_gen) | sed
's|-.*$$||g'`
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool