Skip to content

Commit 62ba514

Browse files
committed
Move gitk to its own subdirectory
This is to prepare for gitk i18n effort that makes gitk not a single file project anymore. We may use subproject to bind git.git and gitk.git more loosely in the future, but we do not want to require everybody to have subproject aware git to be able to pull from git.git yet. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ea55960 commit 62ba514

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

Makefile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,6 @@ ALL_PROGRAMS += git-merge-subtree$X
270270

271271
# what 'all' will build but not install in gitexecdir
272272
OTHER_PROGRAMS = git$X gitweb/gitweb.cgi
273-
ifndef NO_TCLTK
274-
OTHER_PROGRAMS += gitk-wish
275-
endif
276273

277274
# Set paths to tools early so that they can be used for version tests.
278275
ifndef SHELL_PATH
@@ -772,19 +769,14 @@ endif
772769
all::
773770
ifndef NO_TCLTK
774771
$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
772+
$(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
775773
endif
776774
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
777775
$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
778776

779777
strip: $(PROGRAMS) git$X
780778
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
781779

782-
gitk-wish: gitk GIT-GUI-VARS
783-
$(QUIET_GEN)$(RM) $@ $@+ && \
784-
sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
785-
chmod +x $@+ && \
786-
mv -f $@+ $@
787-
788780
git.o: git.c common-cmds.h GIT-CFLAGS
789781
$(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
790782
$(ALL_CFLAGS) -c $(filter %.c,$^)
@@ -1025,7 +1017,7 @@ install: all
10251017
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
10261018
$(MAKE) -C perl prefix='$(prefix_SQ)' install
10271019
ifndef NO_TCLTK
1028-
$(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
1020+
$(MAKE) -C gitk-git install
10291021
$(MAKE) -C git-gui install
10301022
endif
10311023
if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
@@ -1118,7 +1110,7 @@ clean:
11181110
$(MAKE) -C templates/ clean
11191111
$(MAKE) -C t/ clean
11201112
ifndef NO_TCLTK
1121-
$(RM) gitk-wish
1113+
$(MAKE) -C gitk-git clean
11221114
$(MAKE) -C git-gui clean
11231115
endif
11241116
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS

gitk-git/Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# The default target of this Makefile is...
2+
all::
3+
4+
prefix ?= $(HOME)
5+
bindir ?= $(prefix)/bin
6+
TCLTK_PATH ?= wish
7+
INSTALL ?= install
8+
RM ?= rm -f
9+
10+
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
11+
bindir_SQ = $(subst ','\'',$(bindir))
12+
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
13+
14+
ifndef V
15+
QUIET = @
16+
QUIET_GEN = $(QUIET)echo ' ' GEN $@ &&
17+
endif
18+
19+
all:: gitk-wish
20+
install:: all
21+
$(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
22+
clean::
23+
$(RM) gitk-wish
24+
25+
gitk-wish: gitk
26+
$(QUIET_GEN)$(RM) $@ $@+ && \
27+
sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
28+
chmod +x $@+ && \
29+
mv -f $@+ $@
File renamed without changes.

0 commit comments

Comments
 (0)