Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 2006 16:18:16 -0700
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        freebsd-current@FreeBSD.org
Subject:   better way to build libraries..
Message-ID:  <20060928231816.GI80527@funkthat.com>

next in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060928231816.GI80527>