NFS dir timestamp question
scream29125_at_yahoo.com
Date: 05/09/05
- Next message: chloe: "Vigor10 & /etc/hosts file."
- Previous message: Stephen Robinson: "UK ISP (Virgin.net)"
- Next in thread: Allen McIntosh: "Re: NFS dir timestamp question"
- Reply: Allen McIntosh: "Re: NFS dir timestamp question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 May 2005 13:45:07 -0700
In my code compilation environment, I have setup my Makefile
dependencies to use a directory timestamp, like this:
abc: my_obj_dir
$(CC) my_obj_dir/*.o $(LDFLAGS) -o abc
my_obj_dir contains a bunch of .o files. This method assumes that
whenever any file in my_obj_dir changes, the timestamp of my_obj_dir
changes too. So when any .o file gets updated, program "abc" will be
regenerated using those files. This provides an easy way to keep abc
up-to-date, even when the number of .o files in my_obj_dir changes.
This method works fine on locally mounted partitions, but it fails when
my_obj_dir is mounted over NFS. I found that when a new file gets
created in my_obj_dir, my_obj_dir's timestamp is updated, which is
expected. However, when an existing file gets changed/overwritten,
my_obj_dir's timestamp is NOT changed. Hence, abc is not regenerated.
This doesn't seem to be an NFS caching problem, because the timestamp
of my_obj_dir on the NFS server really did not change.
Is this an expected behavior with NFS? If so, what would be a better
solution to achieve the same dependency checking behavior as I
described above?
Thanks.
- Next message: chloe: "Vigor10 & /etc/hosts file."
- Previous message: Stephen Robinson: "UK ISP (Virgin.net)"
- Next in thread: Allen McIntosh: "Re: NFS dir timestamp question"
- Reply: Allen McIntosh: "Re: NFS dir timestamp question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|