Search code examples
linuxgitmakefileportable-executable

What are the files from the 'make' of git that I actually need to run git?


I'm trying to "portablize" git, so I want to send the required executables from the make process of git to my hosted web server. Can I do that? Do you think the executables will work?


Solution

  • The way I do it is to:

    • get all Git dependencies (as listed in this Solaris package site, but this works for any Unix platform)
    • compile those dependencies with --prefix=/home/myuser and install them in the usr/local/lib of my home directory
    • then compile Git (still avoiding any reference to a system path like /usr/local/lib, but only using the lib and include within my homedir)
    • and install Git in the /home/myuser/git directory

    I can then copy only /home/myuser/git and /home/myuser/usr/local (and $prefix/libexec/git-core as Jakub mentions in the comments) to any other similar server, knowing it will work in isolation from any existing system libraries.