From: Derrick Stolee <dstolee@xxxxxxxxxxxxx> As an effort to promote "dogfooding" the sparse-checkout feature within the Git codebase, it is helpful to explore which portions of the codebase are optional. The NO_TCLTK variable in the Makefile allows ignoring the git-gui application at build time. If the local sparse-checkout removes that directory, then the build will fail without manually defining that variable. Instead, check to see if the directory exists at build time to see if we can automatically ignore this directory. With this change, the following list of directories can be supplied to "git sparse-checkout set" and Git will build and test on Linux: Documentation builtin compat/.depend contrib ewah mergetools negotiator perl refs sha1dc sha256 t templates trace2 vcs-svn xdiff The "make install" command requires the "gitweb" and "po" directories. The "po" directory will become optional in the next change. Signed-off-by: Derrick Stolee <dstolee@xxxxxxxxxxxxx> --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2e8029b8026..70760d315cb 100644 --- a/Makefile +++ b/Makefile @@ -313,7 +313,8 @@ all:: # # Define NO_PYTHON if you do not want Python scripts or libraries at all. # -# Define NO_TCLTK if you do not want Tcl/Tk GUI. +# Define NO_TCLTK if you do not want Tcl/Tk GUI. This will also be defined +# if the git-gui directory is missing. # # Define SANE_TEXT_GREP to "-a" if you use recent versions of GNU grep # and egrep that are pickier when their input contains non-ASCII data. @@ -1860,6 +1861,12 @@ ifeq ($(TCLTK_PATH),) NO_TCLTK = NoThanks endif +ifndef NO_TCLTK + ifeq ($(ls git-gui),) + NO_TCLTK = NoThanks + endif +endif + ifeq ($(PERL_PATH),) NO_PERL = NoThanks endif -- gitgitgadget