autoconf
[Top][All Lists]
Advanced

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

distclean vs. clean order dependency


From: Eric Blake
Subject: distclean vs. clean order dependency
Date: Sat, 05 Apr 2008 06:56:43 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I was trying to silence warnings during 'automake -Wall' for autoconf.
However, I can't figure out what to do for this last warning, that
autoconf is overriding automake's definition of distclean-generic.  It
turns out that autoconf has this comment in tests/Makefile.am:

# Avoid a race condition that would make parallel "distclean" fail.
# The rule in clean-local tests for existence of $(TESTSUITE), and
# if found, attempts to run it.  But the distclean-generic rule may
# be running in parallel, and it removes $(DISTCLEANFILES) which
# includes $(TESTSUITE).

The comment is valid.  The only way to solve this is to make sure that
distclean-generic cannot be started until the actions for clean-local have
completed.  But if we attempt:

| distclean-local: clean-local

automake generates this:

| distclean: distclean-am
|       -rm -f Makefile
| distclean-am: clean-am distclean-generic distclean-local
| distclean-generic:
|       ...

which still doesn't have the necessary dependency.  Therefore, autoconf
resorted to copying automake's rules for distclean-generic, and putting
this in Makefile.am:

| distclean-generic: clean-local
|       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)

which solves the ordering constraint, but causes the automake warning.

It seems like this is a bug in automake - shouldn't it output something like:

| distclean: clean-am distclean-am

or, conditional on clean-local being defined,

| distclean: clean-local distclean-am

so that distclean rules don't start until clean rules have completed?  Or
is there some other way, using automake 1.10.1, to add the needed
serialization between clean-local and distclean-generic without triggering
the automake warning about overriding an Automake target?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf3dwsACgkQ84KuGfSFAYD/1wCaApUBAR0QCM7i/p53bv5DpyPY
mWAAn3fAlst/9rWjX8Dw+8FS2etKbXLU
=2UkF
-----END PGP SIGNATURE-----




reply via email to

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