Subject: unexpected behaviour of "make"
To: None <tech-userlevel@NetBSD.org>
From: Klaus Heinz <k.heinz.feb.fuenf@onlinehome.de>
List: tech-userlevel
Date: 02/13/2005 20:15:11
Hi,
while working on a PR, I have observed the following:
$ cat Makefile
Makefile: Makefile.PL
@echo "Makefile.PL is newer than Makefile"
$ touch Makefile ; touch Makefile.PL
$ ls -1t Make*
Makefile.PL
Makefile
$ make
`Makefile' is up to date.
$ stat -f '%m' Makefile Makefile.PL
1108321248
1108321248
$ touch Makefile ; sleep 1; touch Makefile.PL
$ stat -f '%m' Makefile Makefile.PL
1108321269
1108321270
$ make
Makefile.PL is newer than Makefile
Although Makefile.PL is newer, "make" does not recognize that Makefile is
out of date. I guess "make" does not take time differences smaller than a
second into account (which "ls" obviously does).
I would say this violates the POLA, doesn't it?
ciao
Klaus