Hello Juno,
> Gianpaolo Macario <[email protected]> writes:
>
> > By some googling and after reading the git sources and the commit logs
> > I assumed that the `RUNTIME_PREFIX` option (see
> > <https://github.com/git/git/blob/master/exec_cmd.c>) was designed for
> > that purpose,
>
> I do not think so.
>
> The standard procedure to stage into a temporary with "make install"
> and then make a tarball is done by using DESTDIR, e.g. something like
>
> $ make DESTDIR=/var/tmp/gittt ...other args... install
> $ tar zCf /var/tmp/gittt git-version.tar.gz
[Macario, Gianpaolo] Thanks for your reply.
Unfortunately it looks to me that the `--prefix=xxx` option provided to
configure will be hardcoded to the path returned by 'git --exec-path', and I do
not see how this may actually be made dependent on the directory where the
binary tarball will be extracted.
How should I configure/make git to have `<install_path>/bin/git --exec-path`
return a path which depends on `<install_path>` rather than what provided to
`./configure` ?
I tried the following
$ mkdir -p ~/tmp
$ cd ~/tmp
$ wget http://kernel.org/pub/software/scm/git/git-2.3.5.tar.gz
$ tar -xvzf git-2.3.5.tar.gz
$ cd git-2.3.5
$ ./configure --prefix= \
--with-curl --with-openssl --without-tcltk \
CFLAGS="${CFLAGS} `pkg-config --static --libs libcurl`"
$ make
$ make DESTDIR=/var/tmp/gittt install
$ cd /var/tmp/gittt
$ tar -cvzf ~/git-install-2.3.5.tar.gz .
$ cd
$ rm -rf ~/tmp/git-2.3.5
$ rm -rf /var/tmp/gittt
then extracted the tarball
$ sudo mkdir -p /opt/tools
$ sudo chown $USER /opt/tools
$ cd /opt/tools
$ tar -xvzf ~/git-install-2.3.5.tar.gz
This is the result when executing
$ /opt/tools/bin/git --exec-path
/libexec/git-core
I wanted to have it return `/opt/tools/libexec/git-core` instead.
If I do not specify any `--prefix=xxx` when running `./configure`, this
defaults to `/usr/local` which is not good either.
Thanks in advance, and apologies if I am doing something stupid...
Gianpaolo
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html