summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-12-01 21:58:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-12-01 21:58:57 (GMT)
commitd6e09883f20f13c7e2da75225f4563ea9587e20b (patch)
tree45d377338dd3d82153d4337774926dff5d808680
parent5fa00a4dcf5d283c0af50b246b60977c66193c63 (diff)
parent62ba5143ec2ab9d4083669b1b1679355e7639cd5 (diff)
downloadgit-d6e09883f20f13c7e2da75225f4563ea9587e20b.zip
git-d6e09883f20f13c7e2da75225f4563ea9587e20b.tar.gz
git-d6e09883f20f13c7e2da75225f4563ea9587e20b.tar.bz2
Merge branch 'jc/move-gitk'
* jc/move-gitk: Move gitk to its own subdirectory
-rw-r--r--Makefile14
-rw-r--r--gitk-git/Makefile29
-rw-r--r--[-rwxr-xr-x]gitk-git/gitk (renamed from gitk)0
3 files changed, 32 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index e869b85..a7e44a3 100644
--- a/Makefile
+++ b/Makefile
@@ -269,9 +269,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
@@ -775,6 +772,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)
@@ -782,12 +780,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,$^)
@@ -1031,7 +1023,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)'; \
@@ -1124,7 +1116,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
index 0000000..9bc1e24
--- /dev/null
+++ b/gitk-git/Makefile
@@ -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 $@+ $@
diff --git a/gitk b/gitk-git/gitk
index 1da0b0a..1da0b0a 100755..100644
--- a/gitk
+++ b/gitk-git/gitk