[Cluster-devel] [PATCH] Implement objdir support in the build system

Subject: [Cluster-devel] [PATCH] Implement objdir support in the build system

Date: Thu, 20 Dec 2007 22:56:01 +0100 (CET)

Hi guys,

this patch is biggish but extremely simple and it allows to run
./configure on a tree (without touching it) and it will setup a proper
tree (mostly symlinks to the original tree) where you can cd and make
leaving completely untouched the original source.

I saw at least 2 use cases for this:

1) share the same source (let say for example /usr/src NFS shared) across
machines with different arches.
2) build the same source with different options in different trees without
conflicts and having issues to sync the source across the trees.

The patch does:
* globally rename BUILDDIR to SRCDIR to reflect what it really is.
* top level configure:
- add --objdir=/path option (default to current tree - it does not change
current behaviour if not specified and different from current tree)
- add a perl subroutine to handle symlinks
- check and setup /path
- switch all libdirs to use the objdir directly
- propagate objdir to make/defines.mk

NOTE: those changes require 2 perl modules that should be available
everywhere: Cwd 'abs_path'; and File::Basename;.