[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix libobj2.test failure with non-GNU make: define $(AR).
From: |
Stefano Lattarini |
Subject: |
Re: Fix libobj2.test failure with non-GNU make: define $(AR). |
Date: |
Sat, 15 Jan 2011 12:58:09 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
On Saturday 15 January 2011, Ralf Wildenhues wrote:
> automake currently defines $(AR) only if it sees a _LIBRARIES primary.
> That may be an issue or not (and the wrong value for cross setups that
> it defines is definitely an issue), but not important for this test
> IMVHO,
>
I agree with this (_LIBRARIES is used only in `subdir/Makefile.am', but
$(AR) is used in `Makefile.am' -- my bad).
> so how about this patch to avoid a spurious test failure as in
> http://autobuild.josefsson.org/automake/log-201101150749395803000.txt
>
> test -f ./subdir/fsusage.c
> test -f libobj2-1.0/subdir/fsusage.c
> tv ./subdir/libtu.a
> Make: Cannot load tv. Stop.
> *** Error exit code 1
>
> (The important point for fixing the other $(AR) issues is that the
> definition must not clash with one from AC_PROG_LIBTOOL or from users.)
>
> Thanks,
> Ralf
>
> Fix libobj2.test failure with non-GNU make: define $(AR).
>
> * tests/libobj2.test: Ensure $(AR) is suitably defined.
>
> diff --git a/tests/libobj2.test b/tests/libobj2.test
> index 3b3ec98..66ca0d0 100755
> --- a/tests/libobj2.test
> +++ b/tests/libobj2.test
> @@ -24,6 +24,7 @@ cat >> configure.in << 'END'
> AC_CONFIG_FILES([subdir/Makefile])
> AC_PROG_CC
> AC_PROG_RANLIB
> +AC_CHECK_TOOLS([AR], [ar])
> AC_LIBOBJ([fsusage])
> AC_OUTPUT
> END
>
FWIW, seems good to me.
Thanks,
Stefano