]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] clean: do not exceed command line length limits, even with many files
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 7 Jul 2012 19:11:00 +0000 (21:11 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 9 Jul 2012 14:21:48 +0000 (16:21 +0200)
* lib/am/clean.am (.am.rm-f, .am.rm-rf): New internal functions.
(.am.clean-cmd.f, .am.clean-cmd.d): Rewritten using them and the
'am.xargs-map' function, in a way that should prevent failures
due to excessive command line lengths.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
lib/am/clean.am

index d05cd660d951a226c7b800dec1ca86692cccfded..bc11bc4c7c3543c34365ffbb465163fd8f638f84 100644 (file)
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-.am.clean-cmd.f = $(if $(strip $1),rm -f $(strip $1))
-.am.clean-cmd.d = $(if $(strip $1),rm -rf $(strip $1))
+.am.rm-f = $(if $(strip $1),rm -f $(strip $1)$(am__newline))
+.am.rm-rf = $(if $(strip $1),rm -rf $(strip $1)$(am__newline))
+
+.am.clean-cmd.f = $(call am.xargs-map,.am.rm-f,$1)
+.am.clean-cmd.d = $(call am.xargs-map,.am.rm-rf,$1)
 
 am__mostlyclean_files += $(MOSTLYCLEANFILES)
 am__clean_files       += $(CLEANFILES)