This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: automation: problem with builddir != srcdir requirement


On Thu, 2 Mar 2006, Claudio Fontana uttered the following:
> I have a problem with current builddir != srcdir
> requirement in glibc and recent versions of gcc.
> Maybe you can give me an advice, or tweak your build
> system around this problem.
> 
> This program is general enough to build most parts of
> a GNU/Linux system automatically from source without
> any overhead, or manual tweak.
> 
> The problem is that, while an user can read a message
> like:
> 
> configure: error: you must configure in a separate
> build directory
> 
> A program does not expect this.

Fix your program. It's trivial to write a build system with enough
hookability to handle that. (I did it and it took me much less than a
day. That's the whole build system, not just the hooking. The hooking
took about five minutes. It doesn't have your nifty frontend though,
and I haven't dared distribute it yet.)

Indeed, if a build system is to be of much use, it must be much *more*
hookable, otherwise it couldn't possibly handle everything from GNOME's
`run autogen.sh first' through to subversion's `only test after `make
install' and not before' --- and then there are things like the pre-
autoconfiscated X11 to consider...

FWIW I've found that greatest cross-build-system portability is obtained
by cp -al'ing the source tree to a build tree and then doing a srcdir =
objdir build in the common case, and for special cases that cannot
tolerate that (like GCC, glibc, and binutils) doing a `mkdir' instead.

With a little intelligence when finding configure (`look in the objdir,
then in the srcdir if nothing is found in the objdir') this works
completely transparently to the rest of the build system.

Let's not bug package maintainers with this. It's our job to adapt to
*them*, not the other way around.

-- 
`... follow the bouncing internment camps.' --- Peter da Silva


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]