Skip to content

Provide generic "git" Makefile target

Patrick Steinhardt requested to merge pks-makefile-git-target into master

The Makefile currently provides two targets "build-git" and "download-git". This makes it hard to have any other rule depend on Git being built such that the user can choose between either building it himself or downloading a pre-built archive.

Introduce a new generic "git" target which depends on the Git binary. The Git binary is then conditionally provided either by a target which builds or downloads it, depending on a variable GIT_USE_PREBUILT_BINARY. If that variable is set, we will download binaries from our CI. Otherwise, we'll build it ourselves.

This commit also fixes Git being setup anew each time any of these targets got executed. The rule to provide the Git binary depends on the Makefile and will thus get rebuilt whenever the Makefile changes.

Merge request reports