automake-patches
[Top][All Lists]
Advanced

[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: Tue, 24 Jun 2003 22:29:27 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

>>> "derek" == derek  <address@hidden> writes:

 derek> I sent this some time ago, with a fix for automake.in
 derek> but I didn't receive a response.  

Sorry about this.  I saw it, wanted to work on it, delayed it by
lack of time, and finally forgot about it...

 derek> In any case, the issue was that when AC_CONFIG_LINKS is
 derek> used to create a link, the links are never removed, even
 derek> after a `make distclean'.  I thought I had understood
 derek> that `./configure; make all; make distclean' should
 derek> leave me with what I started with.

That what I'd expect too.

 derek> Someone let me know if I'm on the wrong track.  I've
 derek> included the patch with the test which proves the
 derek> problem exists.  If I'm right about this, someone let me
 derek> know and I can forward my automake.in fix.

Please do.  There is also a section in the manual listing macros
Automake recognizes that will need some update...

Here are a few comments about the test case.

[...]

 derek> +# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.

Ahem.

[...]

 derek> +# Test to make sure a clean target depends on previous one.

Ahem.

 derek> +
 derek> +. ./defs || exit 1
 derek> +
 derek> +: > Makefile.am
 derek> +
 derek> +echo "AC_CONFIG_LINKS(src:dest)" >> configure.in
 derek> +
 derek> +$ACLOCAL || exit 1
 derek> +$AUTOMAKE || exit 1
 derek> +
 derek> +grep 'CONFIG_CLEAN_FILES = dest' Makefile.in

In recent test cases, we prefer `set -e' over `|| exit'.  That's
more strict and clear.

Also when possible (and sensible) it's better to check the
feature instead of the implementation.  After all, the above
grep only guarantees that CONFIG_CLEAN_FILES starts with dest,
not that dest will actually be cleaned by `make distclean'.

Since no other test in the suite uses AC_CONFIG_LINKS (it's a
new feature), perhaps it would be worth augmenting it to make
sure that `make clean' will leaves the link untouched, that
multiple links will work too, or any other things you might
think of?

While I'm at it, I'd like to mention tests/README in case you
haven't noticed it (which is easy since it hides in hundreds
test cases).
-- 
Alexandre Duret-Lutz





reply via email to

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