Support to build nginx from an out-of-tree directory

Emmanuel Deloget emmanuel.deloget at
Thu Nov 10 10:32:53 UTC 2011

Hello list,

Attached you'll find a small patch that allow someone to build nginx from a
random directory. Its goal is to support the persons who want to test multiple
build of nginx, or people who do not want to pollute the nginx source tree
with files and directories that do not belong here.

Here is a sample use:

~$ tar zxvf nginx-1.0.9.tar.gz
~$ mkdir nginx-build && cd nginx-build
~$ ../nginx-1.0.9/configure --prefix=/home/me/nginx --user=me --group=me
~$ make && make install

The role of the patch is to find where the nginx source are located (thankfully,
this path is also the path were the configure script is stored) and to setup the
build directory in order to allow successfull compilation and installation of

It successfully isolate the build directory from the source directory, unlike
the --builddir option (which still add some files in the source directory).

Signed-Off-By: Emmanuel Deloget <logout at>

Best regards,

-- Emmanuel Deloget
-------------- next part --------------
A non-text attachment was scrubbed...
Name: call-configure-from-build-dir.patch
Type: text/x-diff
Size: 405 bytes
Desc: not available
URL: <>

More information about the nginx-devel mailing list