# [Feature request] make git buildable from a separate directory

2 messages from 2013-01-05 to 2013-01-06. Participants: Manlio Perillo, Jonathan Nieder.
Thread: https://gitlist.dev/t/32536

## Manlio Perillo, 2013-01-05 20:52

Subject: [Feature request] make git buildable from a separate directory
Message-ID: <50E89275.6080408@gmail.com>
URL: https://gitlist.dev/e/50E89275.6080408%40gmail.com

```
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

Many C projects I have seen (based on autoconf, but not always - like
Nginx) allow the project to be build in a separate directory, in order
to avoid to pollute the working directory with compiled files.

Unfortunately this seems to not be possible with Git.
The Makefile seems quite complex to me, so I'm not sure to be able to
change it to do what I want, without breaking it.


Thanks  Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlDoknUACgkQscQJ24LbaUTw/QCdHbphkU3Mepo98D07yLaj3YyF
5I4Anii94QDHsC1zm2Jp1hy2X/JFa/NE
=vV1z
-----END PGP SIGNATURE-----

```

## Jonathan Nieder, 2013-01-06 00:49

Subject: Re: [Feature request] make git buildable from a separate directory
Message-ID: <20130106004917.GA6063@elie.Belkin>
URL: https://gitlist.dev/e/20130106004917.GA6063%40elie.Belkin
In-Reply-To: <50E89275.6080408@gmail.com>

```
Hi Manlio,

Manlio Perillo wrote:

> Many C projects I have seen (based on autoconf, but not always - like
> Nginx) allow the project to be build in a separate directory, in order
> to avoid to pollute the working directory with compiled files.
>
> Unfortunately this seems to not be possible with Git.

I believe the Cygwin build[1] does this, so that could be a starting
point if you want to work on it.

They use the VPATH variable[2].

Hope that helps,
Jonathan

[1] http://cygwin.com/ml/cygwin/2012-02/msg00391.html
[2] https://www.gnu.org/software/make/manual/html_node/General-Search.html#General-Search

```
