aboutsummaryrefslogtreecommitdiffstats
path: root/gitk-git/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-12-01 13:58:57 -0800
committerJunio C Hamano <gitster@pobox.com>2007-12-01 13:58:57 -0800
commitd6e09883f20f13c7e2da75225f4563ea9587e20b (patch)
tree45d377338dd3d82153d4337774926dff5d808680 /gitk-git/Makefile
parentMerge branch 'jc/branch-contains' (diff)
parentMove gitk to its own subdirectory (diff)
downloadgit-d6e09883f20f13c7e2da75225f4563ea9587e20b.tar.gz
git-d6e09883f20f13c7e2da75225f4563ea9587e20b.zip
Merge branch 'jc/move-gitk'
* jc/move-gitk: Move gitk to its own subdirectory
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 $@+ $@