gitk: Ignore gitk-wish buildproduct
gitk, when bound into the git.git project tree, used to live at the root level, but in 62ba514 (Move gitk to its own subdirectory, 2007-11-17) it was moved to a subdirectory. The code used to track changes to TCLTK_PATH (which should cause gitk to be rebuilt to point at the new interpreter) was left in the main Makefile instead of being moved to the new Makefile that was created for the gitk project. Also add .gitignore file to list build artifacts for the gitk project. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Christian Couder committed
Jan 23, 2013 at 12:00 UTC
a8b38d95715c4bfacca7ddac67f7eb51a4cf5055
2 files changed
+16
-2
.gitignore
new
+2
@@ -0,0 +1,2 @@
1
+/GIT-TCLTK-VARS
2
+/gitk-wish
Makefile
+14
-2
@@ -17,6 +17,16 @@ DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
17
bindir_SQ = $(subst ','\'',$(bindir))
18
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
19
20
+### Detect Tck/Tk interpreter path changes
21
+TRACK_TCLTK = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')
22
+
23
+GIT-TCLTK-VARS: FORCE
24
+ @VARS='$(TRACK_TCLTK)'; \
25
+ if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
26
+ echo 1>&2 " * new Tcl/Tk interpreter location"; \
27
+ echo "$$VARS" >$@; \
28
+ fi
29
+
30
## po-file creation rules
31
XGETTEXT ?= xgettext
32
ifdef NO_MSGFMT
@@ -49,9 +59,9 @@ uninstall::
59
$(RM) '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
60
61
clean::
52
- $(RM) gitk-wish po/*.msg
62
+ $(RM) gitk-wish po/*.msg GIT-TCLTK-VARS
63
54
-gitk-wish: gitk
64
+gitk-wish: gitk GIT-TCLTK-VARS
65
$(QUIET_GEN)$(RM) $@ $@+ && \
66
sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
67
chmod +x $@+ && \
@@ -65,3 +75,5 @@ $(ALL_MSGFILES): %.msg : %.po
75
@echo Generating catalog $@
76
$(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)
77
78
+.PHONY: all install uninstall clean update-po
79
+.PHONY: FORCE