]> git.ipfire.org Git - thirdparty/git.git/commitdiff
NO_TCLTK
authorEygene Ryabinkin <rea-git@codelabs.ru>
Wed, 28 Mar 2007 11:00:23 +0000 (04:00 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 1 Apr 2007 06:59:47 +0000 (23:59 -0700)
Makefile knob named NO_TCLTK was introduced. It prevents the build
and installation of the Tcl/Tk dependent parts.

Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
Makefile

index b159ffd0ae49c28725de6549132e0ad3a3b69d20..0797ad4a990f0518f362e6f1da5a9f66c01e2d7b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -110,6 +110,8 @@ all::
 # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
 # MakeMaker (e.g. using ActiveState under Cygwin).
 #
+# Define NO_TCLTK if you do not want Tcl/Tk GUI.
+#
 
 GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
        @$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -231,6 +233,12 @@ BUILT_INS = \
 # what 'all' will build and 'install' will install, in gitexecdir
 ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
 
+# what 'all' will build but not install in gitexecdir
+OTHER_PROGRAMS = git$X gitweb/gitweb.cgi
+ifndef NO_TCLTK
+OTHER_PROGRAMS += gitk
+endif
+
 # Backward compatibility -- to be removed after 1.0
 PROGRAMS += git-ssh-pull$X git-ssh-push$X
 
@@ -661,13 +669,15 @@ export prefix gitexecdir TAR INSTALL DESTDIR SHELL_PATH template_dir
 
 ### Build rules
 
-all:: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi
+all:: $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS)
 ifneq (,$X)
        $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$p';)
 endif
 
 all::
+ifndef NO_TCLTK
        $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
+endif
        $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
        $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
 
@@ -892,10 +902,13 @@ install: all
        $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'
        $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
        $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
-       $(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'
+       $(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'
        $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
        $(MAKE) -C perl prefix='$(prefix_SQ)' install
+ifndef NO_TCLTK
+       $(INSTALL) gitk '$(DESTDIR_SQ)$(bindir_SQ)'
        $(MAKE) -C git-gui install
+endif
        if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
        then \
                ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
@@ -974,9 +987,11 @@ clean:
        rm -f gitweb/gitweb.cgi
        $(MAKE) -C Documentation/ clean
        $(MAKE) -C perl clean
-       $(MAKE) -C git-gui clean
        $(MAKE) -C templates/ clean
        $(MAKE) -C t/ clean
+ifndef NO_TCLTK
+       $(MAKE) -C git-gui clean
+endif
        rm -f GIT-VERSION-FILE GIT-CFLAGS
 
 .PHONY: all install clean strip