Install-prefix when building should not be hardcoded
- From
- darkdragon <darkdragon-001@web.de>
- Date
- Oct 4, 2022, 07:38 UTC
- Message-ID
- <CAAOCJVAML0axQXbYZncT945SuG3-GfmDtDQ4_8cnkQmF_SZtHw@mail.gmail.com>
Even though in Makefile, it is stated that git will figure out gitexecdir at runtime based on the path to the executable, there are many output files where $(prefix) will be hardcoded. Even git --exec-path will print out $(compile_prefix)/libexec/git-core instead of using run_prefix.
Example: We are building git in Docker at a separate stage to /deploy (since /usr/local is populated with our compiler toolchain). The final image is assembled by copying the contents of /deploy to /usr/local. Commands like "git submodule" will fail because of the wrong git exec path. Searching via "grep -r /deploy" in /deploy after make install yields many results.