summaryrefslogtreecommitdiffstats
path: root/gitk-git/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-17 19:51:16 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-19 04:11:14 +0100
commit62ba5143ec2ab9d4083669b1b1679355e7639cd5 (patch)
tree3cd0ce3471adf189d913144c9a48c06eab767f9f /gitk-git/Makefile
parentUpdate draft release notes for 1.5.4 (diff)
downloadgit-62ba5143ec2ab9d4083669b1b1679355e7639cd5.tar.xz
git-62ba5143ec2ab9d4083669b1b1679355e7639cd5.zip
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>
Diffstat (limited to 'gitk-git/Makefile')
-rw-r--r--gitk-git/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
new file mode 100644
index 0000000000..9bc1e24082
--- /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 $@+ $@