From: Stefano Lattarini Date: Tue, 12 Jun 2012 12:01:45 +0000 (+0200) Subject: Merge branch 'master' into ng/master X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4dfeef7f20c624c4f2d6225bd8277fa774f81687;p=thirdparty%2Fautomake.git Merge branch 'master' into ng/master * master: maintcheck: fix failures, both real and spurious subdir tests: avoid an use of "make -j4", for portability tests: avoid failure due to libtool quirks in C++ demo test tests: fix spurious failures due to missing '$sleep' subdirs: unify rules for "cleaning" and "normal" recursive targets tests: add a "demo" test on C support tests: look for '.lo' rather than '.o' object when using Libtool with C++ cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py" maint: grammar fixes: s/all these/all of these/ subdir-objects: improve "make mostlyclean" efficiency and flexibility Signed-off-by: Stefano Lattarini --- 4dfeef7f20c624c4f2d6225bd8277fa774f81687 diff --cc automake.in index ce3cd6e53,e5f95ee64..7080132b4 --- a/automake.in +++ b/automake.in @@@ -1860,19 -1950,35 +1860,23 @@@ sub handle_single_transform ($$$$$% err_am "'$full' should not contain a '..' component"; } - # Make sure object is removed by 'make mostlyclean'. - $compile_clean_files{$object} = MOSTLY_CLEAN; - # If we have a libtool object then we also must remove - # the ordinary .o. - if ($object =~ /\.lo$/) - { - (my $xobj = $object) =~ s,lo$,\$(OBJEXT),; - $compile_clean_files{$xobj} = MOSTLY_CLEAN; - - # Remove any libtool object in this directory. - $libtool_clean_directories{$directory} = 1; - } + # Make sure *all* objects files in the subdirectory are + # removed by "make mostlyclean". Not only this is more + # efficient than listing the object files to be removed + # individually (which would cause an 'rm' invocation for + # each of them -- very inefficient, see bug#10697), it + # would also leave stale object files in the subdirectory + # whenever a source file there is removed or renamed. + $compile_clean_files{"$directory/*.\$(OBJEXT)"} = MOSTLY_CLEAN; + if ($object =~ /\.lo$/) + { + # If we have a libtool object, then we also must remove + # any '.lo' objects in its same subdirectory. + $compile_clean_files{"$directory/*.lo"} = MOSTLY_CLEAN; + # Remember to cleanup .libs/ in this directory. + $libtool_clean_directories{$directory} = 1; + } - - push (@dep_list, require_build_directory ($directory)); - - # If we're generating dependencies, we also want - # to make sure that the appropriate subdir of the - # .deps directory is created. - push (@dep_list, - require_build_directory ($directory . '/$(DEPDIR)')) - unless option 'no-dependencies'; } - - &pretty_print_rule ($object . ':', "\t", @dep_list) - if scalar @dep_list > 0; } # Transform .o or $o file into .P file (for automatic diff --cc doc/automake-ng.texi index 563a569eb,02d1bb46c..b446fee48 --- a/doc/automake-ng.texi +++ b/doc/automake-ng.texi @@@ -545,16 -538,16 +545,16 @@@ illustration of the GNU Build System i @cindex @file{amhello-1.0.tar.gz}, use cases In this section we explore several use cases for the GNU Build System. - You can replay all these examples on the @file{amhello-1.0.tar.gz} + You can replay all of these examples on the @file{amhello-1.0.tar.gz} -package distributed with Automake. If Automake is installed on your -system, you should find a copy of this file in +package distributed with Automake-NG. If Automake-NG is installed on +your system, you should find a copy of this file in @file{@var{prefix}/share/doc/automake/amhello-1.0.tar.gz}, where @var{prefix} is the installation prefix specified during configuration -(@var{prefix} defaults to @file{/usr/local}, however if Automake was +(@var{prefix} defaults to @file{/usr/local}, however if Automake-NG was installed by some GNU/Linux distribution it most likely has been set -to @file{/usr}). If you do not have a copy of Automake installed, +to @file{/usr}). If you do not have a copy of Automake-NG installed, you can find a copy of this file inside the @file{doc/} directory of -the Automake package. +the Automake-NG package. Some of the following use cases present features that are in fact extensions to the GNU Build System. Read: they are not specified by @@@ -1572,8 -1565,8 +1572,8 @@@ when you execute @command{make} @command{autoreconf} is a script that calls @command{autoconf}, @command{automake}, and a bunch of other commands in the right order. If you are beginning with these tools, it is not important to figure - out in which order all these tools should be invoked and why. However, + out in which order all of these tools should be invoked and why. However, -because Autoconf and Automake have separate manuals, the important +because Autoconf and Automake-NG have separate manuals, the important point to understand is that @command{autoconf} is in charge of creating @file{configure} from @file{configure.ac}, while @command{automake} is in charge of creating @file{Makefile.in}s from