Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Apr 1995 12:13:27 -0700 (PDT)
From:      Steven G Kargl  <kargl@troutmask.apl.washington.edu>
To:        nate@trout.sri.MT.net (Nate Williams)
Cc:        freebsd-hackers@freefall.cdrom.com
Subject:   Re: new install(1) utility
Message-ID:  <199504041913.MAA05237@troutmask.apl.washington.edu>
In-Reply-To: <199504041849.MAA06820@trout.sri.MT.net> from "Nate Williams" at Apr 4, 95 12:49:30 pm

next in thread | previous in thread | raw e-mail | index | archive | help
According to Nate Williams:
> 
> > (2)  -t -- Preserve the timestamp of the source file on target file.
> 
> Is the check done within install to see if the source file is the same
> as the target file?  If we are going to be pulling out information on
> the original file, it seems to be the best solution to do the check
> inside install.  I would also make the Makefiles more clean. :-)

If I understand your question, then No.  I assume you mean that if the
target file already exists, does install compare the source and target
files before installation?  No, the target file is unlinked, then replaced.
The timestamp is then adjusted to reflect the timestamp of the original
file.  I was thinking about the `make depend' step where a newer timestamp 
on a header file forces a new dependence check. 

It sounds like you want:

   if (source exists && target exists) {
      if (strcmp(source, target) == unique files) {
         if (cmp(source, target) == same)
            exit(0);
         else { 
            do normal installation
         }

Hmmm... this could produce a decent timesavings.

-- 
Steven G. Kargl     | Phone: 206-685-4677 |
Applied Physics Lab | Fax:   206-543-6785 |
Univ. of Washington |---------------------|
1013 NE 40th St     | FreeBSD 2.1-current |
Seattle, WA 98105   |---------------------|



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504041913.MAA05237>