[Top][All Lists]

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

Re: How to parallel clean directories?

From: Sam Ravnborg
Subject: Re: How to parallel clean directories?
Date: Sat, 25 Oct 2008 17:43:18 +0200
User-agent: Mutt/

On Sat, Oct 25, 2008 at 09:33:48AM -0500, Peng Yu wrote:
> Hi,
> Suppose there are many subdirectories in a directory. The sub dirs all
> have working makefiles.
> 'make -j3' in the parent dir would parallel make all directories. But
> 'make clean -j3' could not. The problem is that I don't know how to
> clean each directory as well as deleting the file '.d'.
> Can somebody let me know how to do it?

Try to study the following sample:
SUBDIRS := b c d e f


all: $(SUBDIRS)

        @sleep 1; echo rm -f $@/*

See how make is used and not a shell script to
visit each directory.
You should be able to tweak your makefile to use the
same way of doing it.


reply via email to

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