subdir-objects: improve "make mostlyclean" efficiency and flexibility
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 10 Jun 2012 11:38:58 +0000 (13:38 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 10 Jun 2012 12:08:41 +0000 (14:08 +0200)
commit06dfdbe38e78c5eedb03f688f0264ec0097a4e21
tree3b9415bbc86d434bb4a47269ba97ccc694d94d06
parent98b96fccc5df7166a0efc02881a13fbb84e29af6
subdir-objects: improve "make mostlyclean" efficiency and flexibility

Fixes automake bug#10697.

Before this change, the generated Makefile issued one 'rm' invocation
for each subdir object file.  Not only was this very inefficient when
there were several such files, but it also caused stale object files
to be left behind when a source file was renamed or removed.

* automake.in (handle_single_transform): When a subdir object is seen,
update '%compile_clean_files' to clean all the compiled objects in its
same subdirectory, and all the libtool compiled objects ('.lo') there
as well is that subdir object is a libtool one.
* t/subobj-clean-pr10697.sh: New test.
* t/subobj-clean-lt-pr10697.sh: Likewise.
* t/list-of-tests.mk: Add them.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NEWS
automake.in
t/list-of-tests.mk
t/subobj-clean-lt-pr10697.sh [new file with mode: 0755]
t/subobj-clean-pr10697.sh [new file with mode: 0755]