[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extract the archive name from the .la file and use $AR (not ar).
From: |
Ralf Wildenhues |
Subject: |
Re: Extract the archive name from the .la file and use $AR (not ar). |
Date: |
Mon, 30 Aug 2010 20:55:45 +0200 |
User-agent: |
Mutt/1.5.20 (2010-04-22) |
Hi Peter,
* Peter Rosin wrote on Mon, Aug 30, 2010 at 03:25:30PM CEST:
> The archive-in-archive.at test uses ar "blindly". It also assumes that
> the "old archive" of libfoo.la is named libfoo.a, but both that's not
> portable. See attached patch.
OK with nits below.
I don't like that we don't have a decent abstraction for static
libraries, but that again is something we *should* fix in Automake
not Libtool IMVHO. (I'm not yet quite sure how exactly ...)
Thanks,
Ralf
> --- a/tests/archive-in-archive.at
> +++ b/tests/archive-in-archive.at
missing copyright year update.
> @@ -42,11 +42,15 @@ $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c
> -o bar.lo bar.c
> $LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \
> -o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir
> $LIBTOOL --mode=install cp libfoo.la $thisdir
> +eval `$EGREP '^(old_library)=' < libfoo.la`
> +libfoo=$old_library
> AT_CHECK([$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS
> $LDFLAGS \
> - -o libbar.la bar.lo ./libfoo.a -version-info 1:0:0 -rpath $thisdir],
> + -o libbar.la bar.lo $libfoo -version-info 1:0:0 -rpath $thisdir],
> [], [ignore], [ignore])
> AT_CHECK([$LIBTOOL --mode=install cp libbar.la $thisdir], [], [ignore],
> [ignore])
> -AT_CHECK([ar -t libbar.a | grep libfoo.a],[1],[ignore],[ignore])
> -archive_contents=`ar -t libbar.a`
> -AT_XFAIL_IF([case "$archive_contents" in *"libfoo.a"*) : ;; esac])
> +eval `$EGREP '^(old_library)=' < libbar.la`
> +libbar=$old_library
> +AT_CHECK([$AR -t $libbar | grep $libfoo],[1],[ignore],[ignore])
How about $FGREP? You' need to extract it from $LIBTOOL though.
> +archive_contents=`$AR -t $libbar`
> +AT_XFAIL_IF([case "$archive_contents" in *"$libfoo"*) : ;; esac])
This AT_XFAIL_IF it completely bogus at this point. The argument to
AT_XFAIL_IF is, yes, surprisingly, evaluated *before* the rest of the
test group is started. So all it does is
AT_XFAIL_IF([case "$empty_var" in *"$another_empty_var"*) : ;; esac])
Please remove these two lines and instead add
AT_XFAIL_IF([:]) dnl This is currently broken
at the *beginning* of the test group (so readers are not confused)
right after AT_SETUP, and adjust the log entry accordingly.
> AT_CLEANUP
- Extract the archive name from the .la file and use $AR (not ar)., Peter Rosin, 2010/08/30
- Re: Extract the archive name from the .la file and use $AR (not ar).,
Ralf Wildenhues <=
- Re: Extract the archive name from the .la file and use $AR (not ar)., Peter Rosin, 2010/08/31
- Re: Extract the archive name from the .la file and use $AR (not ar)., Ralf Wildenhues, 2010/08/31
- Re: Extract the archive name from the .la file and use $AR (not ar)., Peter Rosin, 2010/08/31
- Re: Extract the archive name from the .la file and use $AR (not ar)., Ralf Wildenhues, 2010/08/31
- Re: Extract the archive name from the .la file and use $AR (not ar)., Peter Rosin, 2010/08/31
- Re: Extract the archive name from the .la file and use $AR (not ar)., Ralf Wildenhues, 2010/08/31
- Re: Extract the archive name from the .la file and use $AR (not ar)., Peter Rosin, 2010/08/31