make keeps directory open after $(wildcard ..) test
From:
dave russo
Subject:
make keeps directory open after $(wildcard ..) test
Date:
Sat, 01 Dec 2001 14:07:51 -0800
The following makefile will *not* remove the directory package on
Win2k machines:
ifeq (,$(wildcard package))
$(shell mkdir package)
endif
ifeq (,$(wildcard package/cfg))
$(shell mkdir package/cfg)
endif
clean:
@rm -rf package
The error message returned by make is:
rm: cannot remove directory "package": The process cannot
access the file because it is being used by another process.
gmake: *** [clean] Error 1
It appears that the "ifeq (,$(wildcard package/cfg))"
statement results in the package directory being opened but not
closed. The "rm -rf" fails due to an access violation;
the rm process finds that the directory package is open by gmake
itself.
This occurs in versions 3.78.1 and 3.79.1 of make on Win2k. I've
tried using both cygnus and MKS version rm.
[Prev in Thread]
Current Thread
[Next in Thread]
make keeps directory open after $(wildcard ..) test,
dave russo<=