make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: directory caching anomalies in win32


From: Eli Zaretskii
Subject: Re: directory caching anomalies in win32
Date: Sat, 21 Apr 2007 12:18:18 +0300

> Date: Fri, 20 Apr 2007 12:06:57 -0700 (PDT)
> From: Aaron Shatters <address@hidden>
> 
> Consider the following makefile:
> ###############################################
> SHELL = C:\WINNT\system32\cmd.exe
> 
> DELETE_FILE = $(shell if exist $(1) del /q $(1) >nul)
> CHECK_FILE_NOT_EXISTS = $(if $(wildcard $(1)),$(error Cannot delete 
> "$(realpath $(1))"))
> 
> DUMP := $(call DELETE_FILE,common.incs)
> DUMP := $(call CHECK_FILE_NOT_EXISTS,common.incs)
> 
> all:
>     @echo Success.
> ###############################################
> 
> If "common.incs" exists before running this makefile, it will fail.  This is 
> because make caches the directory contents, and it doesn't consider rehashing 
> the directory contents until it is looking for a file that doesn't exist in 
> it's cache.

This is how Make works on all platforms, right?  If not, please point
out (in the sources) where the Windows port behaves differently.

If this is how Make behaves in general, then I'd ask Paul to respond.

> The problem seems to be that mtime for the directory is not updated by the 
> file system fast enough before make is checking it.  The file is created, the 
> directory stat() mtime is checked, then the file system updates the directory 
> mtime.  The timing is all messed up.

NTFS filesystems behave sufficiently similar to Posix filesystems, but
not 100% identically.  Can suggest changes in the code that will cause
the ported Make's behavior more closely resemble its behavior on Posix
platforms?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]