From owner-freebsd-hackers Tue Apr 4 12:14:36 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA20391 for hackers-outgoing; Tue, 4 Apr 1995 12:14:36 -0700 Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.97.216]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id MAA20385 for ; Tue, 4 Apr 1995 12:14:34 -0700 Received: (from kargl@localhost) by troutmask.apl.washington.edu (8.6.11/8.6.9) id MAA05237; Tue, 4 Apr 1995 12:13:27 -0700 From: Steven G Kargl Message-Id: <199504041913.MAA05237@troutmask.apl.washington.edu> Subject: Re: new install(1) utility To: nate@trout.sri.MT.net (Nate Williams) Date: Tue, 4 Apr 1995 12:13:27 -0700 (PDT) Cc: freebsd-hackers@freefall.cdrom.com In-Reply-To: <199504041849.MAA06820@trout.sri.MT.net> from "Nate Williams" at Apr 4, 95 12:49:30 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1326 Sender: hackers-owner@FreeBSD.org Precedence: bulk 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 |---------------------|