I decided to tackle the harder solution: making out-of-tree builds automatic.

The patches are lighter and I've separated them out into discrete changes. My 
only
concern is I needed to touch the Gyp generator for Makefiles to make this 
possible
(Gyp's messing with relative paths everywhere prevents out-of-tree otherwise).

That said I'm very pleased with the result. I've tested builds both in source 
and
out-of-tree and nothing has gone amiss so far, so I'd like the patches to get 
some
wider testing.

---

Combined, these patches add support for automatic detection of out-of-tree build
conditions. To use it simply create the out-of-tree build directory, make it the
current working directory, and call the project's configure script using a 
relative
path. E.g:

$ pwd
/projects/test/dep/node
$ mkdir -p /projects/test/build/dep/node
$ cd ../../build/dep/node
$ ../../../dep/node/configure

The Gyp and Make configs will be written to the current working directory along
with the top-level Makefile. Other files will be written into appropriate
sub-directories under the ./out/ directory.

$ ls
config.gypi  config.mk  Makefile  out

$ ls out/
deps      node_dtrace_header.target.mk    node_dtrace_ustack.target.mk  
node_js2c.host.mk       node_systemtap_header.target.mk
Makefile  node_dtrace_provider.target.mk  node_etw.target.mk            
node_perfctr.target.mk  node.target.mk

---

The following changes since commit 5cc3569f6d50560cec1c2dab17b9fb251d26a5df:

  Merge remote-tracking branch 'ry/v0.8' into master (2013-02-06 16:29:30 -0800)

are available in the git repository at:


  git://github.com/iam-TJ/node.git out-of-tree-builds-auto

for you to fetch changes up to 2b81cc4238cd90b4831e2c5258f129a465eab80f:

  Makefile: Add automatic out-of-tree build support (2013-02-07 17:25:11 +0000)

----------------------------------------------------------------
TJ (4):
      Gyp: Generator: make: Add support for out-of-tree builds
      Build: Add automatic out-of-tree build support
      configure: Add automatic out-of-tree build support
      Makefile: Add automatic out-of-tree build support

 Makefile                              | 111 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------
 configure                             |  11 +++++++++--
 tools/gyp/pylib/gyp/generator/make.py |  18 +++++++++++++++---
 tools/gyp_node                        |  12 ++++++++----
 4 files changed, 88 insertions(+), 64 deletions(-)

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to