From owner-freebsd-hackers Fri May 15 01:16:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA05218 for freebsd-hackers-outgoing; Fri, 15 May 1998 01:16:01 -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 BAA05062 for ; Fri, 15 May 1998 01:14:24 -0700 (PDT) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.8.8/8.8.8) id LAA12748; Fri, 15 May 1998 11:14:14 +0300 (EEST) (envelope-from ru) Message-ID: <19980515111414.A12691@ucb.crimea.ua> Date: Fri, 15 May 1998 11:14:14 +0300 From: Ruslan Ermilov To: hackers@FreeBSD.ORG Subject: Problems installing things using /usr/share/mk/* 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 recently ``making the world my own'' I noticed the strange thing. One day (see below) I ran ``make buildworld''. Next morning I've ran ``make installworld''. Then, after succussful upgrade, I tried: # 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 /usr/share/mk/bsd.prog.mk, RELENG_2_2) In this particular 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. How about to install binaries 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. I tried it (modifying /usr/share/mk/*) and was success. Anyone wants to comment? 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