From owner-freebsd-hackers Tue May 12 07:50:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA14341 for freebsd-hackers-outgoing; Tue, 12 May 1998 07:50:23 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from relay.ucb.crimea.ua (relay.ucb.crimea.ua [194.93.177.113]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA13954 for ; Tue, 12 May 1998 07:48:42 -0700 (PDT) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.8.8/8.8.8) id RAA14294; Tue, 12 May 1998 17:48:22 +0300 (EEST) (envelope-from ru) Message-ID: <19980512174822.A14078@ucb.crimea.ua> Date: Tue, 12 May 1998 17:48:22 +0300 From: Ruslan Ermilov To: hackers@FreeBSD.ORG Subject: Discussion: the way the files gets installed Mail-Followup-To: hackers@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91i X-Operating-System: FreeBSD 2.2.6-STABLE i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi! While ``making the world my own'' I noticed the strange thing. Two days ago I've ran ``make buildworld''. Today's morning I've ran ``make installworld''. Then I do: # cd /usr/src/bin/cat; make -n all cc -O -static -o cat cat.o Why the make wants to build the ``cat'' again, I thought? Here's what were digged: 1. The ${PROG} target depends on ${DESTDIR}/usr/lib/libc.a (line 64 of bsd.prog.mk, RELENG_2_2) In this case, the ``cat'' binary depends on /usr/lib/libc.a. 2. /usr/lib/libc.a is older than the /usr/obj/usr/src/bin/cat/cat. -r--r--r-- 1 bin bin 539170 May 12 11:33 /usr/lib/libc.a -rw-r--r-- 1 root bin 539170 May 10 19:52 /usr/obj/usr/src/lib/libc/libc.a -rwxr-xr-x 1 root bin 63788 May 10 20:31 /usr/obj/usr/src/bin/cat/cat Note, that original libc.a in /usr/obj was built earlier that the ``cat''. That's why the make wants to build the ``cat'' binary again. The reason why /usr/lib/libc.a gets older than the libc.a in /usr/obj is in the way the libs are installed. They are installed with ``install -c'' command. I propose to install progs and libs using ``install -p'' instead of ``install -c''. This will preserve the original modification times of the files being installed and will no confuse the make. There are many ways to implement this. The one I thought of was to define and use something like ``PRESERVE= -p'' in bsd.*.mk. Regards, -- Ruslan Ermilov System Administrator ru@ucb.crimea.ua United Commercial Bank +380-652-247647 Simferopol, Crimea 2426679 ICQ Network, UIN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message