From owner-freebsd-current@FreeBSD.ORG Thu Sep 28 23:18:17 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C482116A518 for ; Thu, 28 Sep 2006 23:18:17 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34E4B43D45 for ; Thu, 28 Sep 2006 23:18:17 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (3ipzfut4qge43fe6@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k8SNIGcQ000945 for ; Thu, 28 Sep 2006 16:18:16 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k8SNIGcO000944 for freebsd-current@FreeBSD.org; Thu, 28 Sep 2006 16:18:16 -0700 (PDT) (envelope-from jmg) Date: Thu, 28 Sep 2006 16:18:16 -0700 From: John-Mark Gurney To: freebsd-current@FreeBSD.org Message-ID: <20060928231816.GI80527@funkthat.com> Mail-Followup-To: freebsd-current@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: Subject: better way to build libraries.. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2006 23:18:17 -0000 With the recent libcrypto upgrade, I found out that we can't build libraries (that have special headers) w/o doing a buildworld... This isn't very good as the latest SA requires people to do a buildworld to get the new library.. With a bit of advice from Kris Kennaway, I came up w/ the following patch: Index: Makefile =================================================================== RCS file: /home/ncvs/src/secure/lib/libcrypto/Makefile,v retrieving revision 1.69.2.2 diff -u -r1.69.2.2 Makefile --- Makefile 1 Mar 2005 16:47:38 -0000 1.69.2.2 +++ Makefile 28 Sep 2006 23:09:55 -0000 @@ -4,7 +4,9 @@ SHLIBDIR?= /lib SHLIB_MAJOR= 3 -NOLINT= +NO_LINT= + +CFLAGS+= -I${.OBJDIR}/usr/include .if exists(Makefile.man) .include "Makefile.man" @@ -396,3 +398,7 @@ ${LCRYPTO_SRC}/crypto/x509v3 \ ${LCRYPTO_SRC} \ ${.CURDIR}/man + +buildincs: + mkdir -p ${.OBJDIR}/${INCSDIR} + make includes DESTDIR=${.OBJDIR} INSTALL="sh ${.CURDIR}/../../../tools/install.sh" This builds includes in the OBJDIR so that it can be properly referenced w/o lots of extra work... It'd be good to make this more generic so that it could be integrated into bsd.lib.mk... This obviously won't solve the problem of upgrading two differnet libraries at the same time, but it does make it easier to upgrade your system, and brings the lib's more in line w/ utilities like pciconf that do -I../../sys so that they get the correct ioctl defines outside of a buildworld... The biggest issue I see is finding where tools/install.sh is as it is necessary to skip the owner parts so normal users can make use of it.. Comments? Improvements? /me is glad he didn't have to buidlworld to get the new libcrypto on his 5.4-R system. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."