NO_TCLTK
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>
Eygene Ryabinkin committed
Mar 28, 2007 at 04:00 UTC
3cfaf11b1dc742dcbbf48dd3d6a5ce376e23a2b8
1 file changed
+18
-3
Makefile
+18
-3
@@ -110,6 +110,8 @@ all::
110
# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
111
# MakeMaker (e.g. using ActiveState under Cygwin).
112
#
113
+# Define NO_TCLTK if you do not want Tcl/Tk GUI.
114
+#
115
116
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
117
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -231,6 +233,12 @@ BUILT_INS = \
233
# what 'all' will build and 'install' will install, in gitexecdir
234
ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
235
236
+# what 'all' will build but not install in gitexecdir
237
+OTHER_PROGRAMS = git$X gitweb/gitweb.cgi
238
+ifndef NO_TCLTK
239
+OTHER_PROGRAMS += gitk
240
+endif
241
+
242
# Backward compatibility -- to be removed after 1.0
243
PROGRAMS += git-ssh-pull$X git-ssh-push$X
244
@@ -661,13 +669,15 @@ export prefix gitexecdir TAR INSTALL DESTDIR SHELL_PATH template_dir
669
670
### Build rules
671
664
-all:: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi
672
+all:: $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS)
673
ifneq (,$X)
674
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$p';)
675
endif
676
677
all::
678
+ifndef NO_TCLTK
679
$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
680
+endif
681
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
682
$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
683
@@ -892,10 +902,13 @@ install: all
902
$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'
903
$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
904
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
895
- $(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'
905
+ $(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'
906
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
907
$(MAKE) -C perl prefix='$(prefix_SQ)' install
908
+ifndef NO_TCLTK
909
+ $(INSTALL) gitk '$(DESTDIR_SQ)$(bindir_SQ)'
910
$(MAKE) -C git-gui install
911
+endif
912
if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
913
then \
914
ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
@@ -974,9 +987,11 @@ clean:
987
rm -f gitweb/gitweb.cgi
988
$(MAKE) -C Documentation/ clean
989
$(MAKE) -C perl clean
977
- $(MAKE) -C git-gui clean
990
$(MAKE) -C templates/ clean
991
$(MAKE) -C t/ clean
992
+ifndef NO_TCLTK
993
+ $(MAKE) -C git-gui clean
994
+endif
995
rm -f GIT-VERSION-FILE GIT-CFLAGS
996
997
.PHONY: all install clean strip