Subject: lib/5137: bsd.lib.mk ignores .PATH for lint library installation
To: None <gnats-bugs@gnats.netbsd.org>
From: None <nathanw@MIT.EDU>
List: netbsd-bugs
Date: 03/09/1998 10:52:54
>Number:         5137
>Category:       lib
>Synopsis:       bsd.lib.mk doesn't deal with .PATH for lint library installation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar  9 08:05:01 1998
>Last-Modified:
>Originator:     Nathan J. Williams
>Organization:
Massachve
	Massachvsetts Institvte of Technology
	
>Release:        NetBSD-current as of 98/3/8
>Environment:
	
System: NetBSD road-runner.mit.edu 1.3E NetBSD 1.3E (ROAD-RUNNER) #93: Sun Mar 8 00:08:12 EST 1998 nathanw@road-runner.mit.edu:/u1/usr/src/sys/arch/i386/compile/ROAD-RUNNER i386


>Description:
	bsd.lib.mk's install rule for lint libraries doesn't cope with the 
.PATH directive. This is probably because it invokes install with explicit
names rather than ${.ALLSRC} and ${.TARGET}, as the __archiveinstall and 
shared library rules do. 
	
>How-To-Repeat:
	Try "make install" in src/domestic/lib/libntp and watch it 
bomb out trying to install llib-lntp.ln, since the .PATH is ignored.

road-runner# pwd
/usr/src/domestic/lib/libntp
road-runner# ls -l ../../../lib/libntp/llib-lntp.ln
-rw-r--r--  1 root  wheel  3611 Mar  8 20:34 ../../../lib/libntp/llib-lntp.ln
road-runner# make install
install -c -o root -g wheel -m 600 /usr/src/domestic/lib/libntp/../../../lib/libntp/libntp.a  /usr/lib/libntp.a
ranlib -t /usr/lib/libntp.a
chmod 444 /usr/lib/libntp.a
...successful identical installation of libntp_{p,pic}.a deleted...
install -c -o root -g wheel -m 444 /usr/src/domestic/lib/libntp/../../../lib/libntp/libntp.so.0.0  /usr/lib/libntp.so.0.0
install -c -o root -g wheel -m 444  llib-lntp.ln /usr/libdata/lint
install: llib-lntp.ln: No such file or directory
*** Error code 1

Stop.


>Fix:
	Apply this patch to bsd.lib.mk:

*** bsd.lib.mk.orig	Mon Mar  9 10:49:45 1998
--- bsd.lib.mk	Mon Mar  9 10:50:54 1998
***************
*** 326,332 ****
  .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
  	${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
! 	    llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR}
  .endif
  .endif
  
--- 326,332 ----
  .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
  	${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
! 	    ${.ALLSRC} ${.TARGET}
  .endif
  .endif
  
>Audit-Trail:
>Unformatted: