From owner-freebsd-arch@FreeBSD.ORG Mon Jan 19 03:23:42 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C54D16A4CE for ; Mon, 19 Jan 2004 03:23:42 -0800 (PST) Received: from phantom.cris.net (phantom.cris.net [212.110.130.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26FB543D2D for ; Mon, 19 Jan 2004 03:23:39 -0800 (PST) (envelope-from ru@FreeBSD.org.ua) Received: from phantom.cris.net (ru@localhost [127.0.0.1]) by phantom.cris.net (8.12.10/8.12.10) with ESMTP id i0JBOEjm042956 for ; Mon, 19 Jan 2004 13:24:17 +0200 (EET) (envelope-from ru@FreeBSD.org.ua) Received: (from ru@localhost) by phantom.cris.net (8.12.10/8.12.10/Submit) id i0JBODYZ042946 for arch@FreeBSD.org; Mon, 19 Jan 2004 13:24:13 +0200 (EET) (envelope-from ru) Date: Mon, 19 Jan 2004 13:24:11 +0200 From: Ruslan Ermilov To: arch@FreeBSD.org Message-ID: <20040119112411.GG41159@FreeBSD.org.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="c7hkjup166d4FzgN" Content-Disposition: inline User-Agent: Mutt/1.5.5.1i Subject: Revamp of kerberos5/ makefiles X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2004 11:23:42 -0000 --c7hkjup166d4FzgN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Mark Murray suggested that I leak this here in order to bikeshed it enough before it meets the tree, so here it goes, for those interested... ----- Forwarded message from Ruslan Ermilov ----- Date: Thu, 15 Jan 2004 16:47:24 +0200 =46rom: Ruslan Ermilov To: Mark Murray , "Jacques A. Vidrine" Cc: Bruce Evans Subject: Re: kerberos5/ makefiles revamp On Wed, Jan 14, 2004 at 12:41:22AM +0200, Ruslan Ermilov wrote: > I'd like to spend some time now to revamp the kerberos5/ build > infrastructure [...] >=20 Attached is the functional diff (style changes omitted) to bring kerberos5/ makefiles to a normal level, in my definition of "normal". ;) It also accumulates the previous patch to fix dependencies in the WITH_OPENLDAP case. The commit log would look alongside this: : Overhaul of kerberos5/ makefiles. Most notable changes are: :=20 : - Dropped support for standalone builds, this was only partially : supported anyway, and required so much magic in makefiles that : made life dangerous (e.g., by using the custom yacc rules). :=20 : - Got rid of .OBJDIR in makefiles -- makes building of individual : files possible again. :=20 : - Made the .x.c transformations -j safe. :=20 : - Reprogrammed LDADD to fix static build of some utilities that : was broken. :=20 : - Removed redundant .h's from SRCS, only kept those that are : generated. :=20 : - libkrb5/ INCS were bogusly installed again with libgssapi/. :=20 : - Made build-tools real tools with their own makefiles in : separate directories. This allows us to properly track : their dependencies, etc. :=20 : - Faster build, 21% less of makefile code! What would probably meet some resistance is dropping support for standalone builds, so let me explain it in a bit more detail here (not in the commit log) why I think it should be removed. First, the definition. The standalone build is an ability to just type "make" from the top-level kerberos5/ directory, and have everything built. While the intent seems to be clever, the implementation was only partial and too painful -- lot of trickery in makefiles to pick up fresh headers and non-determinism (depending on the order you make things, different headers may be used). Most importantly, it just didn't work as coded, because to build the non-lib/ portion of kerberos5/, you need to at least have libraries installed, to link against them. Just to proof, an attempt to build the stock fresh kerberos5/ on a 134 days old 5.1-CURRENT machine (9ball.rtp.FreeBSD.org) fails because it attempts to link with an older Heimdal library from /usr/lib: =3D=3D=3D> libexec/kdc kerberos4.o: In function `encode_v4_ticket': kerberos4.o(.text+0x227): undefined reference to `_krb5_krb_time_to_life' *** Error code 1 OTOH, dropping support for standalone builds doesn't mean you can't build it manually, no. It's still possible, just requires a bit more than just typing "make". Specifically, you should just be following the "buildworld" way to build things: make obj (optional) make depend (optional) make includes # build and install includes (cd lib; make all; make install) # build and install libraries make all # build everything else We could even add this sequence to a top level kerberos5/Makefile, as a convenience. ;) Comments, questions, reviews, suggestions (not about fixing style at this time) are highly welcome! Ah, and the last but not least: it has been intensively tested on two UP and SMP machines, outside and within the buildworld, for both native and another platform (TARGET_ARCH=3Dsparc64), with and without -j, and with and without "make depend" in the non-buildworld mode. Please note that before attempting to apply this patch you need to create new src/kerberos5/tools/* directories from the patch manually. The patch is available from: http://people.FreeBSD.org/~ru/patches/kerberos5-makefiles.patch ----- End forwarded message ----- --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --c7hkjup166d4FzgN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAC75bUkv4P6juNwoRAluPAKCCspwcVGUVwP1waS6yV+2nViw7IgCffnrB Mkw1FomUNbM6WpBxpXbIL18= =V4CR -----END PGP SIGNATURE----- --c7hkjup166d4FzgN--