Questions about building git to install in non-standard directory
I'm new to doing this sort of thing.
I am working on a project where I will need to have multiple versions of git installed. I'm on Slackware 14.1 with the defacto git 1.8.4 installed by the slackware install dvd.
I have downloaded git 1.9.0 and have built the config file and compiled with a prefix:
sudo make install
Then I changed my $PATH in .bashrc to:
Git seems to work but how do I know /opt/git1_9_0/bin/git is using the directories in the /opt/git1_9_0 directories and not the ones from the standard install?
| |-- git
| |-- git-cvsserver
| |-- git-receive-pack
| |-- git-shell
| |-- git-upload-archive
| |-- git-upload-pack
| `-- gitk
| `-- perl5
| `-- git-core
Should I be including the /opt/git1_9_0/libexec & share in the path or does git know where these are from relative paths set by the configuration? Is there a way to be certain?
Having said that, the setup that you describe should just about work. The biggest issue I see with your current setup is that, unless you set MANPATH, you are getting the wrong versions of the manpages. If the exact version of git is so important to you, then getting the right documentation is a big deal.
Other stuff is also worryingly shared or sidelined, like the hooks and perl stuff. See below for a suggestion of how to deal with this.
*But* it would probably be much better to uninstall Slackware's git-1.8.4, and build your own 1.8.4 to install under /opt/git1_8_4, so that you have both /opt/git1_9_0 and /opt/git1_8_4. Then only the nondefault paths exist in each version. Thus there would be nothing shared and no possibility of cross-contamination.
[Why the mangled name, anyway? Call it /opt/git-1.9.0 ;)]
|All times are GMT -5. The time now is 02:26 AM.|