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.

_______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to