From rene@tunix.nl  Mon Apr 14 07:16:16 2003
Return-Path: <rene@tunix.nl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id B301337B401; Mon, 14 Apr 2003 07:16:16 -0700 (PDT)
Received: from bastix.tunix.nl (bastix.tunix.nl [193.79.201.39])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id E915543FCB; Mon, 14 Apr 2003 07:16:14 -0700 (PDT)
	(envelope-from rene@tunix.nl)
Received: (from root@localhost) by bastix.tunix.nl (8.9.3c/8.6.12) id QAA14416; Mon, 14 Apr 2003 16:16:25 +0200 (CEST)
Received: by bastix.tunix.nl (TUNIX txp2/smap)
	id sma013538; Mon, 14 Apr 03 16:15:00 +0200
Received: from upsilix.tunix.nl (upsilix.tunix.nl [172.16.2.22])
	by fix.tunix.nl (8.10.2+Sun/8.10.2) with ESMTP id h3EEEm914184;
	Mon, 14 Apr 2003 16:14:48 +0200 (MEST)
Received: from upsilix.tunix.nl (localhost.tunix.nl [127.0.0.1])
	by upsilix.tunix.nl (8.12.6/8.12.6) with ESMTP id h3EEEic5072363;
	Mon, 14 Apr 2003 16:14:45 +0200 (CEST)
	(envelope-from rene@upsilix.tunix.nl)
Received: (from rene@localhost)
	by upsilix.tunix.nl (8.12.6/8.12.6/Submit) id h3EEEhDI072362;
	Mon, 14 Apr 2003 16:14:43 +0200 (CEST)
	(envelope-from rene)
Message-Id: <200304141414.h3EEEhDI072362@upsilix.tunix.nl>
Date: Mon, 14 Apr 2003 16:14:43 +0200 (CEST)
From: Rene de Vries <rene@tunix.nl>
Reply-To: Rene de Vries <rene@tunix.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ru@freebsd.org
Subject: BUG: NOINSTALLLIB isn't honored in all Makefiles
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         50945
>Category:       misc
>Synopsis:       BUG: NOINSTALLLIB isn't honored in all Makefiles
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 14 07:20:13 PDT 2003
>Closed-Date:    Tue Dec 16 02:46:00 PST 2003
>Last-Modified:  Tue Dec 16 02:46:00 PST 2003
>Originator:     Rene de Vries/Edwin H. Kremer
>Release:        FreeBSD 4.7-RELEASE-p3 i386/FreeBSD 5.0-20030401 i386
>Organization:
Tunix OSC BV, Nijmegen
>Environment:
	FreeBSD 4.7-RELEASE-p3 and FreeBSD 5.0-CURRENT-20030401
>Description:
	Libraries don't need to be installed for a binary only
	installation. For the most part of FreeBSD this works using
	the NOINSTALLLIB define (during build and install), but for 
	the makefiles mentioned below this doesn't work properly.
>How-To-Repeat:
>Fix:

Files:
	gnu/lib/csu/Makefile
	lib/csu/i386/Makefile
	lib/csu/i386-elf/Makefile
	lib/libncurses/Makefile

Diffed against FreeBSD 5.0 (as of 20030401):

Index: gnu/lib/csu/Makefile
===================================================================
RCS file: /home/fbsd-cvsrepo/src/gnu/lib/csu/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- gnu/lib/csu/Makefile	27 Feb 2003 09:19:31 -0000	1.16
+++ gnu/lib/csu/Makefile	1 Apr 2003 12:36:18 -0000
@@ -60,9 +60,11 @@
 	${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
 
 realinstall:
+.if !defined(NOINSTALLLIB)
 .for file in ${OBJS} ${SOBJS} ${TGTOBJS}
 	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${file} ${DESTDIR}${LIBDIR}/${file:S/.So$/S.o/}
 .endfor
+.endif
 
 .include <bsd.lib.mk>
Index: lib/csu/i386/Makefile
===================================================================
RCS file: /home/fbsd-cvsrepo/src/lib/csu/i386/Makefile,v
retrieving revision 1.42
diff -u -r1.42 Makefile
--- lib/csu/i386/Makefile	29 Jul 2002 09:40:10 -0000	1.42
+++ lib/csu/i386/Makefile	1 Apr 2003 12:36:18 -0000
@@ -41,8 +41,10 @@
 	@mv ${.TARGET}.tmp ${.TARGET}
 
 realinstall:
+.if !defined(NOINSTALLLIB)
 	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
 		${DESTDIR}${LIBDIR}
+.endif
 
 depend:	.depend
 
Index: lib/csu/i386-elf/Makefile
===================================================================
RCS file: /home/fbsd-cvsrepo/src/lib/csu/i386-elf/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- lib/csu/i386-elf/Makefile	29 Jul 2002 09:40:11 -0000	1.17
+++ lib/csu/i386-elf/Makefile	1 Apr 2003 12:36:18 -0000
@@ -18,7 +18,9 @@
 	${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.CURDIR}/crt1.c
 
 realinstall:
+.if !defined(NOINSTALLLIB)
 	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${OBJS} ${DESTDIR}${LIBDIR}
+.endif
 
 .include <bsd.lib.mk>
Index: lib/libncurses/Makefile
===================================================================
RCS file: /home/fbsd-cvsrepo/src/lib/libncurses/Makefile,v
retrieving revision 1.66
diff -u -r1.66 Makefile
--- lib/libncurses/Makefile	25 Feb 2003 15:41:49 -0000	1.66
+++ lib/libncurses/Makefile	1 Apr 2003 12:36:18 -0000
@@ -230,11 +230,13 @@
 	make_keys MKterm.h.awk comp_captab.c curses.head \
 	namehdr nameftr codeftr ${NAMESRC} ${CODESRC}
 
+.if !defined(NOINSTALLLIB)
 SYMLINKS+=libncurses.a ${LIBDIR}/libcurses.a
 SYMLINKS+=libncurses.a ${LIBDIR}/libtermcap.a
 SYMLINKS+=libncurses.a ${LIBDIR}/libtermlib.a
 SYMLINKS+=libncurses.a ${LIBDIR}/libmytinfo.a
 SYMLINKS+=libncurses.a ${LIBDIR}/libtinfo.a
+.endif
 .if !defined(NOPIC)
 # no need for major at all, it's an ld-time redirection only
 SYMLINKS+=libncurses.so ${SHLIBDIR}/libcurses.so



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Mon Apr 14 07:38:07 PDT 2003 
Responsible-Changed-Why:  
Hmm, I haven't even thought about this application of this knob. 
Will look into it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50945 
State-Changed-From-To: open->feedback 
State-Changed-By: ru 
State-Changed-When: Sat Aug 30 07:01:09 PDT 2003 
State-Changed-Why:  
Rene, I've committed your fix to libncurses/Makefile, but I'm 
not in a mood to commit to various *csu* makefiles.  If you're 
ok with this, I will change this PR's status to "patched". 
Please let me know. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50945 
State-Changed-From-To: feedback->closed 
State-Changed-By: ru 
State-Changed-When: Tue Dec 16 02:45:17 PST 2003 
State-Changed-Why:  
The libncurses/Makefile portion of the patch committed, thank you! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50945 
>Unformatted:
