Very strange behaviour of LFS and TMPFS

Aleksey Cheusov <[email protected]> Wed, 14 Nov 2007 20:30:25 +0200
Newsgroups gmane.os.netbsd.help
Message-ID <[email protected]>
NetBSD chen.chizhovka.net 4.0_RC4 NetBSD 4.0_RC4 (GENERIC) #0: Sun Nov 11 14:06:32 EET 2007  [email protected]:/srv/obj/sys/arch/i386/compile/GENERIC i386

LFS and TMPFS seems broken to me.
'make' program works very strangely.

/dev/wd1f on /srv type lfs (noatime, local):
tmpfs on /tmp type tmpfs (local)

Both these partisions work the same way (incorrectly).

     0 trtr>cat Makefile                                      
     file1 : file0
        cat file0 > $@

     file2 : file1
        cat file1 > $@

     file3 : file2
        cat file2 > $@
     0 trtr>touch file0
     0 trtr>make file3
     cat file0 > file1
     cat file1 > file2
     cat file2 > file3
     0 trtr>touch file0 
     0 trtr>make file3  
     cat file0 > file1
     `file3' is up to date.
     0 trtr>make file3 
     cat file0 > file1
     `file3' is up to date.
     0 trtr>make file3 
     cat file0 > file1
     `file3' is up to date.
     0 trtr>make file3 
     cat file0 > file1
     `file3' is up to date.
     0 trtr>

Why file3 is not rebuilt after I touch file0?

I also played with EXT2FS (the same Makefile)

     0 trtr>touch file0; make file3 
     cat file0 > file1
     cat file1 > file2
     cat file2 > file3
     0 trtr>touch file0; make file3 
     cat file0 > file1
     `file3' is up to date.
     0 trtr>touch file0; make file3 
     cat file0 > file1
     cat file1 > file2
     cat file2 > file3
     0 trtr>touch file0; make file3 
     cat file0 > file1
     cat file1 > file2
     cat file2 > file3
     0 trtr>touch file0; make file3 
     `file3' is up to date.
     0 trtr>

After toching file0, file3 is rebuilt NOT ALWAYS. Why?

-- 
Best regards, Aleksey Cheusov.