Revamp of kerberos5/ makefiles
From: Ruslan Ermilov (ru_at_FreeBSD.org)
Date: 01/19/04
- Previous message: Don Lewis: "Re: Signal delivery to kernel threads/processes?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 19 Jan 2004 13:24:11 +0200 To: arch@FreeBSD.org
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 <ru@FreeBSD.org> -----
Date: Thu, 15 Jan 2004 16:47:24 +0200
From: Ruslan Ermilov <ru@FreeBSD.org>
To: Mark Murray <markm@FreeBSD.org>,
"Jacques A. Vidrine" <nectar@FreeBSD.org>
Cc: Bruce Evans <bde@FreeBSD.org>
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 [...]
>
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:
:
: - 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).
:
: - Got rid of .OBJDIR in makefiles -- makes building of individual
: files possible again.
:
: - Made the .x.c transformations -j safe.
:
: - Reprogrammed LDADD to fix static build of some utilities that
: was broken.
:
: - Removed redundant .h's from SRCS, only kept those that are
: generated.
:
: - libkrb5/ INCS were bogusly installed again with libgssapi/.
:
: - Made build-tools real tools with their own makefiles in
: separate directories. This allows us to properly track
: their dependencies, etc.
:
: - 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:
===> 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=sparc64),
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 -----
-- Ruslan Ermilov FreeBSD committer ru@FreeBSD.org
- application/pgp-signature attachment: stored
- Previous message: Don Lewis: "Re: Signal delivery to kernel threads/processes?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: [PATCH v2] documentation: build source files in Documentation sub-dir
... Add the ability to build source files that are in the Documentation/ dir. ...
(i386 allmodconfig). ... Change all -I$in Makefiles to -I$. ... New
patch file with only that change is below. ... (Linux-Kernel) - [PATCH 2.6.14-rc4] kbuild: once again use Makefiles in obj tree
... This is a re-send of a patch that I mistakenly only sent to Sam. ... of an earlier
patch to restore the use of Makefiles from the objects tree, ... The previous patch
had extended the behavior for Kbuild ... (Linux-Kernel) - Re: [PATCH v2] documentation: build source files in Documentation sub-dir
... Add the ability to build source files that are in the Documentation/ dir. ...
(i386 allmodconfig). ... Change all -I$in Makefiles to -I$. ... New
patch file with only that change is below. ... (Linux-Kernel) - Re: Compiling dbd-oracle on hpux64
... A patch to Makefile.PL would be nice. ... I don't speak perl, I'm merely
the unix admin who has ... I corrected the generated Makefiles by ... (perl.dbi.users)