]> asedeno.scripts.mit.edu Git - git.git/commitdiff
Move gitk to its own subdirectory
authorJunio C Hamano <gitster@pobox.com>
Sat, 17 Nov 2007 18:51:16 +0000 (10:51 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Nov 2007 03:11:14 +0000 (19:11 -0800)
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>
Makefile
gitk-git/Makefile [new file with mode: 0644]
gitk-git/gitk [moved from gitk with 100% similarity, mode: 0644]

index cabde8177e1dd2ad03c558339f932b6959a9bce2..251244ecd18adff0a0b4cbf6bd8596cb2bda3056 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -270,9 +270,6 @@ ALL_PROGRAMS += git-merge-subtree$X
 
 # what 'all' will build but not install in gitexecdir
 OTHER_PROGRAMS = git$X gitweb/gitweb.cgi
-ifndef NO_TCLTK
-OTHER_PROGRAMS += gitk-wish
-endif
 
 # Set paths to tools early so that they can be used for version tests.
 ifndef SHELL_PATH
@@ -772,6 +769,7 @@ endif
 all::
 ifndef NO_TCLTK
        $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
+       $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
 endif
        $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
        $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
@@ -779,12 +777,6 @@ endif
 strip: $(PROGRAMS) git$X
        $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
 
-gitk-wish: gitk GIT-GUI-VARS
-       $(QUIET_GEN)$(RM) $@ $@+ && \
-       sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
-       chmod +x $@+ && \
-       mv -f $@+ $@
-
 git.o: git.c common-cmds.h GIT-CFLAGS
        $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
                $(ALL_CFLAGS) -c $(filter %.c,$^)
@@ -1025,7 +1017,7 @@ install: all
        $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
        $(MAKE) -C perl prefix='$(prefix_SQ)' install
 ifndef NO_TCLTK
-       $(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+       $(MAKE) -C gitk-git install
        $(MAKE) -C git-gui install
 endif
        if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
@@ -1118,7 +1110,7 @@ clean:
        $(MAKE) -C templates/ clean
        $(MAKE) -C t/ clean
 ifndef NO_TCLTK
-       $(RM) gitk-wish
+       $(MAKE) -C gitk-git clean
        $(MAKE) -C git-gui clean
 endif
        $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
new file mode 100644 (file)
index 0000000..9bc1e24
--- /dev/null
@@ -0,0 +1,29 @@
+# The default target of this Makefile is...
+all::
+
+prefix ?= $(HOME)
+bindir ?= $(prefix)/bin
+TCLTK_PATH ?= wish
+INSTALL ?= install
+RM ?= rm -f
+
+DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
+bindir_SQ = $(subst ','\'',$(bindir))
+TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
+
+ifndef V
+       QUIET          = @
+       QUIET_GEN      = $(QUIET)echo '   ' GEN $@ &&
+endif
+
+all:: gitk-wish
+install:: all
+       $(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+clean::
+       $(RM) gitk-wish
+
+gitk-wish: gitk
+       $(QUIET_GEN)$(RM) $@ $@+ && \
+       sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
+       chmod +x $@+ && \
+       mv -f $@+ $@
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from gitk
rename to gitk-git/gitk