[Top][All Lists]

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

cleaning in conditional subdirs

From: Steve Robbins
Subject: cleaning in conditional subdirs
Date: Sun, 5 Nov 2000 17:12:44 -0500 (EST)


I just ran into some "surprising" behaviour.

[Apologies if this has been covered before -- I couldn't figure out how to
search the list archives at]

The situation is (and I double-checked that it persists with CVS automake
and autoconf) with a and conditionally-defined SUBDIRS, e.g.

        if USE_B
        SUBDIRS = a b
        SUBDIRS = a

Now, suppose "USE_B" is false.  

Of course, lists b/Makefile in AC_OUTPUT, so b/Makefile is

The variable SUBDIRS is defined as "a" alone, so all rules but one do NOT
descend into subdir "b" (the exception is "make distdir").

This means that the sequence
        make distclean

which one expects (after a fresh unpacking of the .tar.gz) to be a no-op,
will in fact create the file b/Makefile.

Now, on the face of it, an obvious remedy seems to be that all the "make
clean" family (clean,distclean,maintainer-clean) of rules should descend
into all possible subdirs, as does the "distdir" rule.

Would that be correct?  Are there drawbacks?


reply via email to

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