help-make
[Top][All Lists]
Advanced

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

delete large list of files


From: Raleigh Rinehart
Subject: delete large list of files
Date: Mon, 04 Apr 2011 13:16:21 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9

Hi All,
I'm am having a bit of trouble with a function I have to delete a long list of files.

Here is the function:


# $(call rm-cmd,FILE_LIST,Chunk Size,rm options)
rm-cmd=$(strip $(eval __a :=)$(foreach w,$1,$(if $(filter $2,$(words $(__a))),$(shell $(RM) $3 $(strip $(__a)) )$(eval __a:=))$(eval __a +=$w))$(shell $(RM) $3 $(__a))

and it gets called like this:
.PHONY: cleanest
cleanest:
    @echo removing target lib subdirs
$(foreach target,$(VALID_TARGETS),$(call rm-cmd,$(subst cleanest,$(target),$(subst /,\,$(dir $(libraries)))),50,-v -r))


If i replace $(shell ...) with $(info ...) in the function I can see that the long list is indeed being broken up into smaller chunks. So from that perspective it is working. The file and/or folder names that get passed to the function are also correct.
It just seems as though the $(shell ...) isn't actually doing anything.


This is using gnu-make 3.81 on windows:
C:\>make --version
GNU Make (Sourcery G++ Lite 2009q3-68) 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-mingw32


*Note that the rm-cmd function is a modified version of one I found in the archives used to echo a list to a file.
http://lists.gnu.org/archive/html/help-make/2005-02/msg00067.html





reply via email to

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