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



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to