|
From: | Peter Halliday |
Subject: | [bug #26075] $(wildcard) function holds parent directories open preventing deletes |
Date: | Fri, 03 Apr 2009 13:28:36 +0000 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729) |
Follow-up Comment #2, bug #26075 (project make): I think I have a fix for this issue (at least it's working for me with my makefiles). I have edited dir.c to limit the maximum number of open directories under windows to just 1 (normally it is 10) this results in directories being closed straight away after caching contents. The change is to replace the following line: #define MAX_OPEN_DIRECTORIES 1 with: #ifdef WINDOWS32 /* Under windows holding directories open at all can cause problems as it prevents them being deleted. For instance in this makefile example the clean target will fail as the build directory will be locked by the make process as a result of the wildcard test: all: $(filter-out $(wildcard buildrelease), buildrelease) buildrelease: mkdir buildrelease clean: rmdir /Q /S build This may be an NTFS specific problem but I have not yet checked this on a Fat file system. */ # define MAX_OPEN_DIRECTORIES 1 #else # define MAX_OPEN_DIRECTORIES 10 #endif I have also attached my version of dir.c (file #17859) _______________________________________________________ Additional Item Attachment: File name: dir.c Size:30 KB _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?26075> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |