Date: Wed, 29 Aug 2001 13:33:24 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Bruce Evans <bde@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/mk bsd.libnames.mk Message-ID: <20010829133324.A88558@sunbay.com> In-Reply-To: <200108290756.f7T7uiN38413@freefall.freebsd.org>; from bde@FreeBSD.org on Wed, Aug 29, 2001 at 12:56:44AM -0700 References: <200108290756.f7T7uiN38413@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 29, 2001 at 12:56:44AM -0700, Bruce Evans wrote:
> bde 2001/08/29 00:56:44 PDT
>
> Modified files:
> share/mk bsd.libnames.mk
> Log:
> Removed some garbage (LIBGMP, LIBSKEY). Using LIBSKEY in LIBPAM should
> have been fatal since it gave a dependency on a nonexistent file, but it
> worked because of an undocumented bugfeature in make(1): missing source
> files named *.a are silently assumed to be up to date.
>
Hmm, this seem to be caused by these two lines in sys.mk:
.SUFFIXES: .a
.LIBS: .a
Its intended use could be demonstrated by an empty sys.mk file and the
following Makefile:
.SUFFIXES: .a .h
.LIBS: .a
.INCLUDES: .h
.PATH.a: /usr/lib /usr/local/lib
.PATH.h: /usr/include /usr/local/include
foo:
@echo .LIBS=${.LIBS}
@echo .INCLUDES=${.INCLUDES}
This feature is lightly documented in 12.make paper, section 4.2,
and is documented even more in arch.c:Arch_LibOODate():
* There are several ways for a library to be out-of-date that are
* not available to ordinary files. In addition, there are ways
* that are open to regular files that are not available to
* libraries. A library that is only used as a source is never
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* considered out-of-date by itself. This does not preclude the
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* library's modification time from making its parent be out-of-date.
* A library will be considered out-of-date for any of these reasons,
* given that it is a target on a dependency line somewhere:
This test seems to be wrong if the library does not exist. The false
"`foo.a' is up to date." problem could be fixed by this patch, but it
still does not do the required "don't know how to make foo.a" bit.
Index: arch.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/make/arch.c,v
retrieving revision 1.21
diff -u -p -r1.21 arch.c
--- arch.c 2001/03/01 06:03:17 1.21
+++ arch.c 2001/08/29 10:33:48
@@ -1169,9 +1169,9 @@ Arch_LibOODate (gn)
{
Boolean oodate;
- if (OP_NOP(gn->type) && Lst_IsEmpty(gn->children)) {
+ if (gn->mtime != 0 && OP_NOP(gn->type) && Lst_IsEmpty(gn->children)) {
oodate = FALSE;
- } else if ((gn->mtime > now) || (gn->mtime < gn->cmtime)) {
+ } else if (gn->mtime == 0 || gn->mtime > now || gn->mtime < gn->cmtime) {
oodate = TRUE;
} else {
#ifdef RANLIBMAG
Cheers,
--
Ruslan Ermilov Oracle Developer/DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010829133324.A88558>
