bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no license on some test modules


From: Bruno Haible
Subject: Re: no license on some test modules
Date: Wed, 26 Dec 2007 16:06:39 +0100
User-agent: KMail/1.5.4

Eric Blake wrote:
> If libtests.a is listed first, progname.o is not included.  But if it 
> is listed second only, then gl_array_list.o generates a missing link to 
> xmalloc 
> and friends.  The only solution is repeating the LDADD.  I'm committing the 
> following:
> 
> From: Eric Blake <address@hidden>
> Date: Mon, 10 Dec 2007 09:54:54 -0700
> Subject: [PATCH] Avoid link failures with separate libtests.a.
> 
> * gnulib-tool (func_emit_tests_Makefile_am): Also list local_ldadd
> last, to satisfy circular dependencies.

Thanks for dealing with this so quickly. Two tweaks, though:
  - It's not needed to mention the dependencies of libm4.a twice; once
    is enough.
  - Adjust the comments: There's nothing wrong with the 'progname' module.
    The problem is in the 'error' module.

Bruno

2007-12-22  Bruno Haible  <address@hidden>

        * gnulib-tool (func_emit_tests_Makefile_am): Replace local_ldadd with
        two variables local_ldadd_before, local_ldadd_last.

*** gnulib-tool.orig    2007-12-22 17:09:13.000000000 +0100
--- gnulib-tool 2007-12-22 17:09:13.000000000 +0100
***************
*** 1919,1932 ****
    echo "  -I${testsbase_inverse} -I\$(srcdir)/${testsbase_inverse} \\"
    echo "  -I${testsbase_inverse}/${sourcebase-lib} 
-I\$(srcdir)/${testsbase_inverse}/${sourcebase-lib}"
    echo
!   local_ldadd=''
    if $use_libtests; then
!     local_ldadd=' libtests.a $(LIBTESTS_LIBDEPS)'
    fi
!   # local_ldadd must be listed first, since it often depends on non-test
!   # modules; it must also be listed last, since it can include modules
!   # such as progname that satisfy dependencies of non-test modules.
!   echo "LDADD =${local_ldadd} 
${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}${local_ldadd}"
    echo
    if $use_libtests; then
      echo "libtests_a_SOURCES ="
--- 1919,1939 ----
    echo "  -I${testsbase_inverse} -I\$(srcdir)/${testsbase_inverse} \\"
    echo "  -I${testsbase_inverse}/${sourcebase-lib} 
-I\$(srcdir)/${testsbase_inverse}/${sourcebase-lib}"
    echo
!   local_ldadd_before=''
!   local_ldadd_after=''
    if $use_libtests; then
!     # All test programs need to be linked with libtests.a.
!     # It needs to be passed to the linker before ${libname}.${libext}, since
!     # the tests-related modules depend on the main modules.
!     # It also needs to be passed to the linker after ${libname}.${libext}
!     # because the latter might contain incomplete modules (such as the 'error'
!     # module whose dependency to 'progname' is voluntarily omitted).
!     # The LIBTESTS_LIBDEPS can be passed to the linker once or twice, it does
!     # not matter.
!     local_ldadd_before=' libtests.a'
!     local_ldadd_after=' libtests.a $(LIBTESTS_LIBDEPS)'
    fi
!   echo "LDADD =${local_ldadd_before} 
${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}${local_ldadd_after}"
    echo
    if $use_libtests; then
      echo "libtests_a_SOURCES ="





reply via email to

[Prev in Thread] Current Thread [Next in Thread]