[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 02-distclean-test.diff
From: |
Alexandre Duret-Lutz |
Subject: |
Re: 02-distclean-test.diff |
Date: |
Wed, 25 Jun 2003 10:27:22 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
>>> "Derek" == Derek Robert Price <address@hidden> writes:
Derek> Okay, this patch includes the fix. It seems to work correctly, except
Derek> multiple invocations of AC_CONFIG_LINKS with the same source file seem
Derek> to cause multiple warnings when the file is missing:
Derek> configure.in:10: required file `./sdir/src' not found
Derek> configure.in:10: required file `sdir/src' not found
Derek> Should I worry about this? Would you like me to write
Derek> another test for the require functionality?
I don't think you should worry about it. That's probably due to
the strange logic in the require_file* functions. Rewriting
these have been on the TODO list for a very long time.
Another facet of the require functionality you could check, if
you want, is that these files actually get distributed. (I like
to do this from a make rule, so that I don't have to know
$(distdir) -- for example see include2.test.)
Derek> One last question, why is only the last $where preserved
Derek> for AC_CONFIG_FILES and the like?
I can't think of any reason, unless all that code was copied
from AC_CONFIG_HEADER which never really supported more than one
header (due to the rebuild rules that call autoheader, IIRC).
Derek> I duplicated this behavior for AC_CONFIG_LINKS, but it
Derek> doesn't seem like it would be very hard to preserve the
Derek> exact $where for each macro invocation.
Indeed.
Derek> Index: automake.in
Looks great.
[...]
Derek> +. ./defs || exit 1
Derek> +
Derek> +echo 'SUBDIRS = sdir' > Makefile.am
Derek> +: > src
Derek> +mkdir sdir
Derek> +: > sdir/Makefile.am
Derek> +: > sdir/src
Derek> +mkdir sdir-no-make
Derek> +
Derek> +cat >>configure.in << 'EOF'
Derek> +AM_INIT_AUTOMAKE
You shouldn't need this one: it's already in configure.in.
(Aside: I'm surprised one can call AM_INIT_AUTOMAKE twice.
Maybe we should have a sanity check about this.)
Derek> +AC_CONFIG_FILES(sdir/Makefile)
Derek> +AC_CONFIG_LINKS(dest:src)
Derek> +AC_CONFIG_LINKS(dest2:src)
Derek> +AC_CONFIG_LINKS(sdir/dest:src)
Derek> +AC_CONFIG_LINKS(dest3:sdir/src)
Derek> +AC_CONFIG_LINKS(sdir/dest2:sdir/src sdir-no-make/dest:src)
Derek> +AC_OUTPUT
Derek> +EOF
Derek> +
Derek> +set -e
Better put `set -e' directly after ./defs || exit 1. Even the
echo/mkdir/:/cat can fail.
[...]
Derek> +set +e
I think this is not needed either. `false && exit 1' is
perfectly safe with `set -e'.
Derek> +test -r dest && exit 1
Derek> +test -r dest2 && exit 1
Derek> +test -r sdir/dest && exit 1
Derek> +test -r dest3 && exit 1
Derek> +test -r sdir/dest2 && exit 1
Derek> +test -r sdir-no-make/dest && exit 1
I'm surprised this succeeds. When sdir-no-make/dest does not
exist (which is expected), this last line should return with $?
= 1. At least that's how it works with all the shell I've tried
(independently of the set-e/set+e setting). Because it's the
last command, the whole script will exit with this same $?,
hence reporting a failure.
One generally adds a `exit 0', or simply `:', at the end of a
test when the last check is negated.
--
Alexandre Duret-Lutz
- 02-distclean-test.diff, derek, 2003/06/24
- Re: 02-distclean-test.diff, Alexandre Duret-Lutz, 2003/06/24
- Re: 02-distclean-test.diff, Derek Robert Price, 2003/06/24
- Re: 02-distclean-test.diff, Derek Robert Price, 2003/06/24
- 1.8 TODO (Was: Re: 02-distclean-test.diff), Alexandre Duret-Lutz, 2003/06/26
- Re: 1.8 TODO, Akim Demaille, 2003/06/27
- Re: 1.8 TODO, Alexandre Duret-Lutz, 2003/06/27
- Re: 1.8 TODO, Akim Demaille, 2003/06/27
- Re: 1.8 TODO, Alexandre Duret-Lutz, 2003/06/27
- Re: 02-distclean-test.diff, Derek Robert Price, 2003/06/25
- Re: 02-distclean-test.diff, Derek Robert Price, 2003/06/26