Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 May 1998 17:48:22 +0300
From:      Ruslan Ermilov <ru@ucb.crimea.ua>
To:        hackers@FreeBSD.ORG
Subject:   Discussion: the way the files gets installed
Message-ID:  <19980512174822.A14078@ucb.crimea.ua>

next in thread | raw e-mail | index | archive | help
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



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