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/



_______________________________________________
Bug-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to