git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is it possible to build `git` such that the install directory and the deployment prefix is not the same?
@ 2015-11-28  7:19 Henry Qin
  2015-11-28  7:54 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Henry Qin @ 2015-11-28  7:19 UTC (permalink / raw)
  To: git

Dear Git developers,

I've looked around the online forums and also asked this question on
Stackoverflow, but have not gotten an answer.

http://stackoverflow.com/questions/33901216/is-it-possible-to-build-git-such-that-the-install-directory-and-the-deployment

Here is the question, copied below for your convenience:

"""
I am attempting to build git from source, and I would like make
install to put the binaries into a directory called dist in my source
directory, so I use the following configure line.

./configure --prefix=`pwd`/dist

Unfortunately, this also causes the build output to assume that this
is the final install location for git, and therefore hardcode the path
into various scripts and binaries such as
libexec/git-core/git-difftool.

Is there a way to specify during either configure or make that I want
a different path for actual deployment, such as /usr/bin/local, but
still have make install go into the directory pwd/dist?
"""


Thanks,
~Henry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is it possible to build `git` such that the install directory and the deployment prefix is not the same?
  2015-11-28  7:19 Is it possible to build `git` such that the install directory and the deployment prefix is not the same? Henry Qin
@ 2015-11-28  7:54 ` Junio C Hamano
  2015-11-28  7:58   ` Henry Qin
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2015-11-28  7:54 UTC (permalink / raw)
  To: Henry Qin; +Cc: git

Henry Qin <root@hq6.me> writes:

> Here is the question, copied below for your convenience:
>
> """
> I am attempting to build git from source, and I would like make
> install to put the binaries into a directory called dist in my source
> directory, so I use the following configure line.
>
> ./configure --prefix=`pwd`/dist

You probably want to use DESTDIR instead, e.g.

    $ make prefix=/usr/local DESTDIR=/var/tmp/dest

The standard way to phrase your question is "how do I 'make install'
to install to a fake location so that I can tar up the result into a
tarball?" (the key part being "so that..."), I think.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is it possible to build `git` such that the install directory and the deployment prefix is not the same?
  2015-11-28  7:54 ` Junio C Hamano
@ 2015-11-28  7:58   ` Henry Qin
  0 siblings, 0 replies; 3+ messages in thread
From: Henry Qin @ 2015-11-28  7:58 UTC (permalink / raw)
  To: Junio C Hamano, dennis; +Cc: git

Thanks a lot, Junio and Dennis!

~Henry

On Fri, Nov 27, 2015 at 11:47 PM, Dennis Kaarsemaker
<dennis@kaarsemaker.net> wrote:
> On vr, 2015-11-27 at 23:19 -0800, Henry Qin wrote:
>
>> Is there a way to specify during either configure or make that I want
>> a different path for actual deployment, such as /usr/bin/local, but
>
> There is, using the DESTDIR variable:
>
> make PREFIX=/usr/local
> DESTDIR=$(PWD)/dist make install
> --
> Dennis Kaarsemaker
> www.kaarsemaker.net
>
>


On Fri, Nov 27, 2015 at 11:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Henry Qin <root@hq6.me> writes:
>
>> Here is the question, copied below for your convenience:
>>
>> """
>> I am attempting to build git from source, and I would like make
>> install to put the binaries into a directory called dist in my source
>> directory, so I use the following configure line.
>>
>> ./configure --prefix=`pwd`/dist
>
> You probably want to use DESTDIR instead, e.g.
>
>     $ make prefix=/usr/local DESTDIR=/var/tmp/dest
>
> The standard way to phrase your question is "how do I 'make install'
> to install to a fake location so that I can tar up the result into a
> tarball?" (the key part being "so that..."), I think.
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-28  7:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-28  7:19 Is it possible to build `git` such that the install directory and the deployment prefix is not the same? Henry Qin
2015-11-28  7:54 ` Junio C Hamano
2015-11-28  7:58   ` Henry Qin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).