Subject: bin/9330: make should not test format of non-existent lib.
To: None <gnats-bugs@gnats.netbsd.org>
From: Simon J. Gerraty <sjg@quick.com.au>
List: netbsd-bugs
Date: 02/01/2000 20:00:54
>Number:         9330
>Category:       bin
>Synopsis:       make should not test format of non-existent lib.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb  1 20:00:01 2000
>Last-Modified:
>Originator:     Simon J. Gerraty
>Organization:
Zen Programming...
>Release:        1.3, 1.4 and -current
>Environment:
	
System: NetBSD zen.quick.com.au 1.3.2 NetBSD 1.3.2 (ZEN-PUC) #5: Fri Oct 8 23:46:14 EST 1999 root@zen.quick.com.au:/u3/NetBSD/1.3.2/src/sys/arch/i386/compile/ZEN-PUC i386

>Description:
	
Make tests the format of a library before accepting it as such.
If the library does not exist, this test causes it to not be treated
as a libray.  The original behaviour for non-existent libs was to
consider them up to date, this path is now never taken. 

>How-To-Repeat:
	
Put an incorrect lib in DPADD and target will be relinked everytime
make is run.
>Fix:
	
I have already committed the following fix.

Index: make.c
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/make/make.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- make.c      1999/09/16 00:54:14     1.24
+++ make.c      2000/01/31 13:21:20
@@ -202,7 +202,8 @@ Make_OODate (gn)
            printf(".USE node...");
        }
        oodate = FALSE;
-    } else if ((gn->type & OP_LIB) && Arch_IsLib(gn)) {
+    } else if ((gn->type & OP_LIB) &&
+              ((gn->mtime==0) || Arch_IsLib(gn))) {
        if (DEBUG(MAKE)) {
            printf("library...");
        }
>Audit-Trail:
>Unformatted: