make keeps an open handle to a file, can't delete parent directory

Marco Atzeri
Thu Jan 25 08:30:00 GMT 2007

--- Alexander Sotirov <> ha

> Hi,
> I am having a problem with GNU make 3.81 on cygwin
> 1.5.22. It looks like a
> problem with cygwin and not make, but I am not sure
> exactly what's causing it.

confirmed also with 20070118 shapshot and 3.81-1

> The part of the makefile that causes this error is
> the implicit rule on the
> bottom of the file. This rule specifies an implicit
> rule for files inside the
> foo/bar/ directory. If the rule is present, make
> keeps an open handle to the
> foo/bar/ directory, which prevents it from being
> deleted. If the rule is
> commented out, everything works fine.
> If we replace the 'rm -rf' command with 'sleep' and
> running Process Explorer, it
> shows the open handle in make. I've attached a
> screenshot of that.
> Alex
> > create:
> 	mkdir foo
> 	mkdir foo/bar
> clear:
> 	-rm -rf foo
> 	ls -la foo
> foo/bar/%.obj: foo/bar/%.c
> 	echo implicit rule
> > 

it seems an issue of make as

rm -rf foo
gave no problem on command line



Vinci i biglietti per FIFA World Cup in Germania!

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list