I struggled for a while with the following situation: 1. make on my local disk works fine: a subsequent make says "nothing to be done" 2. make on my NFS mount builds everything correctly, but a subsequent make complains that I have to rebuild stuff
I knew that there shouldn't be any rebuilding necessary, so I found the first file that make claims was out of date, and checked its timestamps. What I found was that the dependency (file being copied by cp -a) had a non-integral mtime, but the target always had an integer mtime: $ make > make4.out 2>&1 $ make -n -d > make5.out 2>&1 $ grep -B1 'Must remake target' make5.out | grep 'is newer than target' | head -1 Prerequisite `/path/to/staging/busybox-1.4.0/bin/busybox' is newer than target `/path/to/deploy/box_x86_debug/bin/busybox'. $ stat /path/to/staging/busybox-1.4.0/bin/busybox /path/to/deploy/box_x86_debug/bin/busybox File: `/path/to/staging/busybox-1.4.0/bin/busybox' Size: 560140 Blocks: 1104 IO Block: 32768 regular file Device: 26h/38d Inode: 2335853 Links: 1 Access: (0755/-rwxr-xr-x) Uid: (10059/ qwv684) Gid: (10001/ma29cu01) Access: 2007-05-14 21:32:46.147767000 -0400 Modify: 2007-05-14 21:32:46.154757000 -0400 Change: 2007-05-14 21:32:48.284627000 -0400 File: `/path/to/deploy/box_x86_debug/bin/busybox' Size: 560140 Blocks: 1104 IO Block: 32768 regular file Device: 26h/38d Inode: 20095217 Links: 1 Access: (0755/-rwxr-xr-x) Uid: (10059/ qwv684) Gid: (10001/ma29cu01) Access: 2007-05-14 21:32:46.000000000 -0400 Modify: 2007-05-14 21:32:46.000000000 -0400 Change: 2007-05-14 21:48:56.102837000 -0400 $ Here is the rule that copied one file to the other: $ make nothing -p | grep -A7 /path/to/deploy/box_x86_debug/bin/busybox: /path/to/deploy/box_x86_debug/bin/busybox: /path/to/staging/busybox-1.4.0/bin/busybox # Implicit rule search has not been done. # Implicit/static pattern stem: `bin/busybox' # Modification time never checked. # File has not been updated. # commands to execute (from `make/busybox.mk', line 295): mkdir -p $(@D) && cp -af $< $@ I tried to reproduce this behavior, but could not: $ touch test $ cp -af test test2 $ stat test test2 File: `test' Size: 0 Blocks: 0 IO Block: 32768 regular empty file Device: 26h/38d Inode: 15119606 Links: 1 Access: (0644/-rw-r--r--) Uid: (10059/ qwv684) Gid: (10001/ma29cu01) Access: 2007-05-14 22:48:01.058211000 -0400 Modify: 2007-05-14 22:48:01.058211000 -0400 Change: 2007-05-14 22:48:01.058211000 -0400 File: `test2' Size: 0 Blocks: 0 IO Block: 32768 regular empty file Device: 26h/38d Inode: 6176374 Links: 1 Access: (0644/-rw-r--r--) Uid: (10059/ qwv684) Gid: (10001/ma29cu01) Access: 2007-05-14 22:48:01.058211000 -0400 Modify: 2007-05-14 22:48:01.058211000 -0400 Change: 2007-05-14 22:48:05.858411000 -0400 As you can see, in this case, cp -a copied the fractional portion of the mtime. Can anyone explain why cp -a might copy the fractional portion of the mtime *sometimes* but not others? Dave _______________________________________________ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make