[Top][All Lists]

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

Re: Simpler example of pathological behavior of directory caching

From: Kyle Rose
Subject: Re: Simpler example of pathological behavior of directory caching
Date: Thu, 6 Oct 2016 11:47:02 -0700

On Thu, Oct 6, 2016 at 11:38 AM, Paul Smith <address@hidden> wrote:
You should include the version of GNU make that you're using; my
version works as expected:

$ make --version
GNU Make 4.2.1

Funny you should mention that:

$ make --version
GNU Make 4.2.1
Built for i686-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ make
touch target1
touch target2
touch target3
touch target4
touch target5
touch target6
touch target7
touch target8
touch target9
touch target10
$ make
glob: target10 target3 target8 target7 target6 target5 target1 target2 target9 target4

4.2.1 definitely broken, at least on my system.

>> Why not refresh the cache when the directory's mtime has changed?

Because not all systems have the same rules for directory mtime as
POSIX does, so that's not a reliable/portable indicator.

What does POSIX have to say about returning the wrong value for $(wildcard ...)?
There's no question the caching needs to be improved.

Consistency may be desirable in general, but correctness in my environments (mainly Linux and OS X) is more desirable for me. Given the various ifdefs around Windows, for instance, there's already no guarantee of consistency of behavior across OSes, so I'm not really convinced by that argument.

In any event, the existing behavior is a flat-out defect and should be corrected.


reply via email to

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