Subject: Re: sup and make
To: None <tv@pobox.com>
From: Ian Dall <Ian.Dall@dsto.defence.gov.au>
List: current-users
Date: 06/18/1999 13:57:49
Todd Vierling <tv@pobox.com> writes:
> On Wed, 16 Jun 1999, Ian Dall wrote:
> : I have started using sup to maintain a NetBSD source tree. A problem I
> : can forsee is that the sup'ed files have there original mtime, which
> : could be older than the corresponding object files (or other dependant
> : files). What I would like is to be able to do a sup and a make and
> : have only the changed files recompiled.
> From my own experience with sup, it uses the current date for the mtime on
> modified files. If that's changed, it should be investigated.
It is certainly not what I see. If you sup daily, then most, if not all files
would have the current date, because the only files you would get would be files
created since yesterday, however, the mtime will not be the time it is written
on your disk. To see this just try ls -lc and ls -lt on the same (sup'd) file.
The problem is if this happens:
Client Repository
sup
update foo.c
make foo.o
sup
make foo.o
The problem is that foo.o will not be remade by the second
make.
I'm not sure that telling sup to set mtime equal to ctime would solve the
problem, because sup compares mtimes (at least optionally).
On the other hand an option to make to test for older based on the
ctime of the dependancy rather than its mtime would at worst result in
some extra things being built (AFAIK it is impossible for ctime to be
less than mtime) and then only if you have done a chmod or similar.
Ian