aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2013-01-23 12:00:35 -0800
committerPaul Mackerras <paulus@samba.org>2013-01-30 21:12:16 +1100
commita8b38d95715c4bfacca7ddac67f7eb51a4cf5055 (patch)
tree304adcf33f5685f0ec9f79165e50c8b1a4cdbb60
parent386befb773e2b4a7cc31135f22555e27597392c1 (diff)
downloadgit-a8b38d95715c4bfacca7ddac67f7eb51a4cf5055.tar.gz
git-a8b38d95715c4bfacca7ddac67f7eb51a4cf5055.tar.xz
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>
-rw-r--r--.gitignore2
-rw-r--r--Makefile16
2 files changed, 16 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..d7ebcaf36
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/GIT-TCLTK-VARS
+/gitk-wish
diff --git a/Makefile b/Makefile
index e1b604560..5acdc900a 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,16 @@ DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
bindir_SQ = $(subst ','\'',$(bindir))
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
+### Detect Tck/Tk interpreter path changes
+TRACK_TCLTK = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')
+
+GIT-TCLTK-VARS: FORCE
+ @VARS='$(TRACK_TCLTK)'; \
+ if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
+ echo 1>&2 " * new Tcl/Tk interpreter location"; \
+ echo "$$VARS" >$@; \
+ fi
+
## po-file creation rules
XGETTEXT ?= xgettext
ifdef NO_MSGFMT
@@ -49,9 +59,9 @@ uninstall::
$(RM) '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
clean::
- $(RM) gitk-wish po/*.msg
+ $(RM) gitk-wish po/*.msg GIT-TCLTK-VARS
-gitk-wish: gitk
+gitk-wish: gitk GIT-TCLTK-VARS
$(QUIET_GEN)$(RM) $@ $@+ && \
sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
chmod +x $@+ && \
@@ -65,3 +75,5 @@ $(ALL_MSGFILES): %.msg : %.po
@echo Generating catalog $@
$(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)
+.PHONY: all install uninstall clean update-po
+.PHONY: FORCE