|
From: | Charles Wilson |
Subject: | Re: Automake,cygwin: 'make clean' with libtool wrappers... |
Date: | Mon, 06 May 2002 04:07:45 -0400 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 |
Alexandre Duret-Lutz wrote:
[I haven't read the whole thread.] I understand what both `foo.$(EXEEXT)' and `foo' need to be erased, but I fail to see the point in cleaning `.libs/': doesn't clean-libtool already do that? (I think people aren't expected to call clean-binPROGRAMS, are they?)
I wasn't sure of the correct protocol: should clean-binPROGRAMS clean *everything* related to programs, or just the stuff that other rules wouldn't also catch?
Now that I think about it, probably the latter: you don't expect clean-binPROGRAMS to clean up all of the .o's and .lo's that were used to build the programs...so it makes sense to let clean-libtool handle the .libs/_libs subdirectory.
Also, for simplicity I suggest dropping `test -f' and erasing all files in a single `rm -f' call: .PHONY clean-am: clean-%DIR%PROGRAMS clean-%DIR%PROGRAMS: - -test -z "$(%DIR%_PROGRAMS)" || rm -f $(%DIR%_PROGRAMS) +?!LIBTOOL? -test -z "$(%DIR%_PROGRAMS)" || rm -f $(%DIR%_PROGRAMS) +?LIBTOOL? @list='$(%DIR%_PROGRAMS)'; for p in $$list; do \ +?LIBTOOL? f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ +?LIBTOOL? echo " rm -f $$p $$f"; \ +?LIBTOOL? rm -f $$p $$f ; \ +?LIBTOOL? done
If this is accepted, I'd be perfectly happy. --Chuck
[Prev in Thread] | Current Thread | [Next in Thread] |