I can reproduce it too: martind@swiftboat:~/playpen/kyle-rose$ rm -f target*; ~/download/make-git/make touch target1 touch target2 touch target3 touch target4 touch target5 touch target6 touch target7 touch target8 touch target9 touch target10 glob: martind@swiftboat:~/playpen/kyle-rose$ make --version GNU Make 4.2.1 Built for x86_64-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. martind@swiftboat:~/playpen/kyle-rose$
That was built from git a few seconds ago. martind@swiftboat:~/playpen/kyle-rose$ uname -a Linux swiftboat 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux martind@swiftboat:~/playpen/kyle-rose$ Local ext4 storage. I was surprised. I thought I'd deduced from its behavior that make updated the cache for the targets it thinks it's created as it creates them, thus circumventing the OP's oddly peremptory insistence that you check the directory mtime. (Perhaps there was some history that explains the tone but, although the Subject looks like it was a follow-up, the mail doesn't seem to be a reply to anything I remember or that I've been able to find.) I had wondered if I'd misunderstood when the $(wildcard) is evaluated, but $(error) there goes off when the recipe is executed, not when it's parsed. From: Bug-make [mailto:[email protected]] On Behalf Of Kyle Rose Sent: Thursday, October 06, 2016 11:47 To: [email protected] Cc: [email protected] Subject: Re: Simpler example of pathological behavior of directory caching On Thu, Oct 6, 2016 at 11:38 AM, Paul Smith <[email protected]<mailto:[email protected]>> 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<https://urldefense.proofpoint.com/v2/url?u=http-3A__gnu.org_licenses_gpl.html&d=CwMFaQ&c=DZ-EF4pZfxGSU6MfABwx0g&r=oBMzc8Omr1YTgjig4n4076T3IKL7TuNH9HpVbojD-ms&m=Yq6vHfmdyiW2vn2la-IYLb4iRyy2HP5rbTmwKYZlYPA&s=F-dMOt19ld6mt-ABTGtXB093IqxnY0C43unW2fFcnDA&e=>> 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 glob: $ 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. Kyle
_______________________________________________ Bug-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-make
