bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnulib-tool --with-tests vs. gnulib-tool --update


From: Bruno Haible
Subject: Re: gnulib-tool --with-tests vs. gnulib-tool --update
Date: Mon, 28 May 2007 17:46:01 +0200
User-agent: KMail/1.5.4

Eric Blake wrote:
> Is there any reason that this sequence forgets that I wanted the gnulib
> unit tests added to my testsuite?
> 
> gnulib-tool --tests-base=tests --with-tests --import --dir=. --lib=libm4
> --source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=. --no-libtool
> --macro-prefix=M4 avltree-oset ...
> 
> gnulib-tool --update

It's a bug. The appended patch may fix it.


2007-05-28  Bruno Haible  <address@hidden>

        * gnulib-tool (func_import): Remember the --with-tests command-line
        option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
        Reported by Eric Blake.

*** gnulib-tool 12 Apr 2007 13:02:00 -0000      1.232
--- gnulib-tool 28 May 2007 15:42:43 -0000
***************
*** 1566,1571 ****
--- 1566,1572 ----
    cached_m4base=
    cached_docbase=
    cached_testsbase=
+   cached_inctests=
    cached_libname=
    cached_lgpl=
    cached_makefile_name=
***************
*** 1599,1604 ****
--- 1600,1608 ----
        /gl_TESTS_BASE(/ {
          s,^.*gl_TESTS_BASE([[ ]*\([^])]*\).*$,cached_testsbase="\1",p
        }
+       /gl_WITH_TESTS/ {
+         s,^.*$,cached_inctests=true,p
+       }
        /gl_LIB(/ {
          s,^.*gl_LIB([[ ]*\([^])]*\).*$,cached_libname="\1",p
        }
***************
*** 1687,1692 ****
--- 1691,1700 ----
        func_fatal_error "missing --tests-base option"
      fi
    fi
+   # Require the tests if specified either way.
+   if test -z "$inctests"; then
+     inctests="$cached_inctests"
+   fi
    # The libname defaults to the cached one.
    if test -z "$supplied_libname"; then
      libname="$cached_libname"
***************
*** 1977,1982 ****
--- 1985,1993 ----
    func_append actioncmd " --m4-base=$m4base"
    func_append actioncmd " --doc-base=$docbase"
    func_append actioncmd " --aux-dir=$auxdir"
+   if test -n "$inctests"; then
+     func_append actioncmd " --with-tests"
+   fi
    for module in $avoidlist; do
      func_append actioncmd " --avoid=$module"
    done
***************
*** 2066,2071 ****
--- 2077,2083 ----
      echo "gl_M4_BASE([$m4base])"
      echo "gl_DOC_BASE([$docbase])"
      echo "gl_TESTS_BASE([$testsbase])"
+     test -z "$inctests" || echo "gl_WITH_TESTS"
      echo "gl_LIB([$libname])"
      test -z "$lgpl" || echo "gl_LGPL"
      echo "gl_MAKEFILE_NAME([$makefile_name])"
***************
*** 3080,3086 ****
                # Perform func_import in a subshell, so that variable values
                # such as
                #   local_gnulib_dir, avoidlist, sourcebase, m4base, docbase,
!               #   testsbase, libname, lgpl, makefile_name, libtool, 
macro_prefix
                # don't propagate from one directory to another.
                (func_import) || func_exit 1
              done
--- 3092,3099 ----
                # Perform func_import in a subshell, so that variable values
                # such as
                #   local_gnulib_dir, avoidlist, sourcebase, m4base, docbase,
!               #   testsbase, inctests, libname, lgpl, makefile_name, libtool,
!               #   macro_prefix
                # don't propagate from one directory to another.
                (func_import) || func_exit 1
              done





reply via email to

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