libtool-patches
[Top][All Lists]
Advanced

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

Re: [patch 05/19] 288-gary-ltdl-nonrecursive-tests.diff Queue


From: Ralf Wildenhues
Subject: Re: [patch 05/19] 288-gary-ltdl-nonrecursive-tests.diff Queue
Date: Tue, 11 Oct 2005 10:52:57 +0200
User-agent: Mutt/1.5.11

Hi Gary,

* Gary V. Vaughan wrote on Mon, Oct 10, 2005 at 12:26:29PM CEST:
>  Makefile.am           |    1 
>  tests/nonrecursive.at |  115 
> ++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/testsuite.at    |    2 
>  3 files changed, 118 insertions(+)
> 
> Index: libtool--devo--1.0/ChangeLog
> from  Gary V. Vaughan  <address@hidden>
>       * tests/subdirectory.at: New tests for libltdl as a subdirectory,
>       configured and compiled from the toplevel project.
>       * tests/testsuite.at: Use it.
>       * Makefile.am (TESTSUITE_AT): Depend on it.

See nits below, and this one: all of them FAIL with 2.59/1.9.6 (without
libobjdir fixes):

[...]
| nonrecursive.at:66: $AUTORECONF --force --verbose --install
| stderr:
| autoreconf: Entering directory `.'
| autoreconf: configure.ac: not using Gettext
| autoreconf: running: aclocal --force -I libltdl/m4
| autoreconf: configure.ac: tracing
| autoreconf: configure.ac: not using Libtool
| autoreconf: running: autoconf --force
| autoreconf: running: autoheader --force
| autoreconf: running: automake --add-missing --copy --force-missing
| configure.ac: installing `libltdl/config/install-sh'
| configure.ac: installing `libltdl/config/missing'
| configure.ac:8: installing `libltdl/config/config.guess'
| configure.ac:8: installing `libltdl/config/config.sub'
| Makefile.am: installing `libltdl/config/compile'
| configure.ac:11: required file `./lt__dirent.c' not found
| configure.ac:11: required file `./argz.c' not found
| configure.ac:11: required file `./lt__strl.c' not found
| Makefile.am: installing `libltdl/config/depcomp'
| autoreconf: automake failed with exit status: 1

Can you make them SKIP in this case, so we don't get oodles of bogus bug
reports?

I'm not _quite_ sure how to do this nicely.  Reinstating your extra test
for woring LIBOBJDIR support won't help: autotest tests should be
independent of each other, and runnable on their own.  Maybe just make a
macro that wraps the `automake' call, saves its output and checks for
error containing `lt__dirent' specifically, in order to decide whether
to SKIP?

More below.

Cheers,
Ralf

> Index: libtool--devo--1.0/Makefile.am
> ===================================================================
> --- libtool--devo--1.0.orig/Makefile.am
> +++ libtool--devo--1.0/Makefile.am
> @@ -360,6 +360,7 @@ TESTSUITE_AT      = tests/testsuite.at \
>                 tests/duplicate_members.at \
>                 tests/inherited_flags.at \
>                 tests/libtoolize.at \
> +               tests/nonrecursive.at \
>                 tests/old-m4-iface.at \
>                 tests/standalone.at \
>                 tests/deplibs-ident.at \
> Index: libtool--devo--1.0/tests/nonrecursive.at
> ===================================================================
> --- /dev/null
> +++ libtool--devo--1.0/tests/nonrecursive.at
> @@ -0,0 +1,115 @@
> +# Hand crafted tests for GNU Libtool.                         -*- Autotest 
> -*-
> +# Copyright 2005 Free Software Foundation, Inc.
> +
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2, or (at your option)
> +# any later version.
> +
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write to the Free Software
> +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
> +# 02111-1307, USA.
> +
> +
> +AT_BANNER([Nonrecursive Automake Libltdl.])
> +
> +# _LTDL_SETUP

The naming is unfortunate.  As all the tests share an m4 macro name
space, and you actually use _LTDL_SETUP in several othere tests for a
different purpose, please rename all of them.  Maybe m4_undefine at the
end of the test would be ok as well, but then I believe you wanted to
share some macros.

> +# -----------
> +m4_define([_LTDL_SETUP],
> +[AT_DATA([configure.ac],
> +[[AC_INIT([subdirectory-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
> +LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
> +AC_CONFIG_AUX_DIR([libltdl/config])
> +AC_CONFIG_MACRO_DIR([libltdl/m4])
> +AC_CONFIG_LIBOBJ_DIR([libltdl])

Urgs.  In large packages, these three settings are going to be a major
pain in the long run.  I'm not saying you need to change them here, this
issue isn't a Libtool problem rather than an Autoconf/Automake one, but
it'd be good if people could change all three of these and things would
still work somehow.

(Just thinking out loud; nothing we'll want to worry about before 2.0.)

> +AM_PROG_CC_C_O

Why do you need this?  Is it only for Automake backwards compatibility?
If so, then I recommend adding AC_PROG_CC before as well.

> +AM_INIT_AUTOMAKE([foreign subdir-objects])

I believe you should have AM_INIT_AUTOMAKE before AM_PROG_CC_C_O.
After all, AM_INIT_AUTOMAKE should be the first automake macro called.

> +LT_INIT
> +LT_WITH_LTDL
> +AC_CONFIG_FILES([Makefile])
> +AC_OUTPUT
> +]])
> +
> +AT_DATA([Makefile.am],
> +[[ACLOCAL_AMFLAGS = -I libltdl/m4
> +BUILT_SOURCES =
> +EXTRA_DIST =
> +CLEANFILES =
> +MOSTLYCLEANFILES =

If you agree on my suggestions wrt. Makefile.inc changes, this needs to
be adjusted as well.

> +
> +include libltdl/Makefile.inc
> +
> +lib_LTLIBRARIES += foo.la
> +foo_la_LDFLAGS = -module -avoid-version
> +]])
> +
> +touch foo.c

Empty source files are not portable.
You can use
  echo 'static int dummy = 0;' > foo.c
instead.  If you want, just fix the same bug in subproject.at as well,
sorry for not seeing that earlier.

> +])# _LTDL_SETUP
> +
> +## ------------------------ ##
> +## Softlinked libltdl tree. ##
> +## ------------------------ ##
> +
> +AT_SETUP([compiling softlinked libltdl])
> +
> +_LTDL_SETUP
> +
> +LT_AT_LIBTOOLIZE([--ltdl])
> +AT_CHECK([if test -f libltdl/configure.ac; then false; fi])
> +
> +LT_AT_AUTORECONF([--force --verbose --install])
> +LT_AT_CONFIGURE
> +LT_AT_MAKE
> +
> +AT_CHECK([test -f libltdl/libltdlc.la])
> +
> +AT_CLEANUP
> +
> +
> +## -------------------- ##
> +## Copied libltdl tree. ##
> +## -------------------- ##
> +
> +AT_SETUP([compiling copied libltdl])
> +
> +_LTDL_SETUP
> +
> +LT_AT_LIBTOOLIZE([--copy --ltdl])
> +AT_CHECK([if test -f libltdl/configure.ac; then false; fi])
> +
> +LT_AT_AUTORECONF([--force --verbose --install])
> +LT_AT_CONFIGURE
> +LT_AT_MAKE
> +
> +AT_CHECK([test -f libltdl/libltdlc.la])
> +
> +AT_CLEANUP
> +
> +
> +## ------------------------- ##
> +## Installable libltdl tree. ##
> +## ------------------------- ##
> +
> +AT_SETUP([installable libltdl])
> +
> +_LTDL_SETUP
> +
> +prefix=`pwd`/_inst
> +
> +LT_AT_LIBTOOLIZE([--copy --ltdl])
> +AT_CHECK([if test -f libltdl/configure.ac; then false; fi])
> +
> +LT_AT_AUTORECONF([--force --verbose --install])
> +LT_AT_CONFIGURE([--enable-ltdl-install --prefix=$prefix])
> +LT_AT_MAKE([all install])
> +
> +AT_CHECK([test -f $prefix/lib/libltdl.la])
> +AT_CHECK([test -f $prefix/include/ltdl.h])
> +
> +AT_CLEANUP
> Index: libtool--devo--1.0/tests/testsuite.at
> ===================================================================
> --- libtool--devo--1.0.orig/tests/testsuite.at
> +++ libtool--devo--1.0/tests/testsuite.at
> @@ -149,6 +149,8 @@ m4_include([am-subdir.at])
>  m4_include([standalone.at])
>  # subproject libltdl compilation
>  m4_include([subproject.at])
> +# nonrecursive libltdl compilation
> +m4_include([nonrecursive.at])
>  # C++ templates tests
>  m4_include([template.at])
>  # Behaviour of LT_OUTPUT




reply via email to

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