{"thread":{"id":"32573","subject":"[PATCH] Makefile: track TCLTK_PATH as it used to be tracked","startedAt":"2013-01-09T16:55:31Z","lastAt":"2013-01-09T16:55:31Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"206389","messageId":"7vobgy70u4.fsf@alter.siamese.dyndns.org","threadId":"32573","inReplyTo":null,"subject":"[PATCH] Makefile: track TCLTK_PATH as it used to be tracked","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-01-09T16:55:31Z","receivedAt":"2013-01-09T16:55:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Christian Couder <chriscool@tuxfamily.org>\n\ngitk, when bound into the git.git project tree, used to live at the\nroot level, but in 62ba514 (Move gitk to its own subdirectory,\n2007-11-17) it was moved to a subdirectory.  The code used to track\nchanges to TCLTK_PATH (which should cause gitk to be rebuilt to\npoint at the new interpreter) was left in the main Makefile instead\nof being moved to the new Makefile that was created for the gitk\nproject.\n\nAlso add .gitignore file to list build artifacts for the gitk\nproject.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n Paul, this is relative to the tip of your tree, 386befb (gitk:\n Display important heads even when there are many, 2013-01-02).\n Could you consider applying it?\n\n Also I notice that you have many patches I still do not have\n there, and I'd appreciate a \"Go ahead and pull from me!\".\n\n Thanks.\n\n .gitignore |  2 ++\n Makefile   | 16 ++++++++++++++--\n 2 files changed, 16 insertions(+), 2 deletions(-)\n create mode 100644 .gitignore\n\ndiff --git a/.gitignore b/.gitignore\nnew file mode 100644\nindex 0000000..d7ebcaf\n--- /dev/null\n+++ b/.gitignore\n@@ -0,0 +1,2 @@\n+/GIT-TCLTK-VARS\n+/gitk-wish\ndiff --git a/Makefile b/Makefile\nindex e1b6045..5acdc90 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -17,6 +17,16 @@ DESTDIR_SQ = $(subst ','\\'',$(DESTDIR))\n bindir_SQ = $(subst ','\\'',$(bindir))\n TCLTK_PATH_SQ = $(subst ','\\'',$(TCLTK_PATH))\n \n+### Detect Tck/Tk interpreter path changes\n+TRACK_TCLTK = $(subst ','\\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')\n+\n+GIT-TCLTK-VARS: FORCE\n+\t@VARS='$(TRACK_TCLTK)'; \\\n+\t\tif test x\"$$VARS\" != x\"`cat $@ 2>/dev/null`\" ; then \\\n+\t\t\techo 1>&2 \"    * new Tcl/Tk interpreter location\"; \\\n+\t\t\techo \"$$VARS\" >$@; \\\n+\t\tfi\n+\n ## po-file creation rules\n XGETTEXT   ?= xgettext\n ifdef NO_MSGFMT\n@@ -49,9 +59,9 @@ uninstall::\n \t$(RM) '$(DESTDIR_SQ)$(bindir_SQ)'/gitk\n \n clean::\n-\t$(RM) gitk-wish po/*.msg\n+\t$(RM) gitk-wish po/*.msg GIT-TCLTK-VARS\n \n-gitk-wish: gitk\n+gitk-wish: gitk GIT-TCLTK-VARS\n \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n \tsed -e '1,3s|^exec .* \"$$0\"|exec $(subst |,'\\|',$(TCLTK_PATH_SQ)) \"$$0\"|' <gitk >$@+ && \\\n \tchmod +x $@+ && \\\n@@ -65,3 +75,5 @@ $(ALL_MSGFILES): %.msg : %.po\n \t@echo Generating catalog $@\n \t$(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)\n \n+.PHONY: all install uninstall clean update-po\n+.PHONY: FORCE\n-- \n1.8.1.336.g866ceff\n"}]}