[Top][All Lists]

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

distclean should walk subdirs in reverse order

From: Sam Varshavchik
Subject: distclean should walk subdirs in reverse order
Date: Sat, 09 Mar 2013 10:09:59 -0500

Consider automake being used together with GNU make and autoconf.

Top level directory 'main'. Two subdirectories, 'a' and 'b'.











include $(shell pwd)/../a/

main's configure creates a/ frome, and main/b/Makefile will include it, since automake will refuse to parse such an include file, and leave it up to make to deal with. also gets installed (yes, I'm installing a makefile fragment, this is a development tool); and it also needs to be DISTCLEANed, for make distcheck to pass.

However, what's going to happen here is that distclean-recursive ends up recursing into main/a first, and remove, and failing when it subsequently recurses into main/b, since the included file isn't there any more.

I think that distclean-recursive should handle SUBDIRS or DIST_SUBDIRS in reverse order from what they're listed. Or, default to SUBDIRS in reverse order, or the explicit order given in DIST_SUBDIRS. In the meantime, off I go writing another convoluted gmake macro to set DIST_SUBDIRS by reversing SUBDIRS…

Attachment: pgptkk0NfvFs0.pgp
Description: PGP signature

reply via email to

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