{"thread":{"id":"32384","subject":"[PATCH] Makefile: track TCLTK_PATH as it used to be tracked","startedAt":"2012-12-18T14:57:52Z","lastAt":"2012-12-18T18:23:10Z","messageCount":3,"participants":["Christian Couder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"205121","messageId":"20121218145753.28253.98431.chriscool@tuxfamily.org","threadId":"32384","inReplyTo":null,"subject":"[PATCH] Makefile: track TCLTK_PATH as it used to be tracked","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2012-12-18T14:57:52Z","receivedAt":"2012-12-18T14:57:52Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"A long time ago, gitk used to live at the root of the git.git\nrepository. In 62ba514 (Move gitk to its own subdirectory,\n2007-11-17) it was moved to a subdirectory, but some code used\nto track TCLTK_PATH was left in the main Makefile instead\nof being moved to the new Makefile that was created in gitk-git/.\n\nThe code left in the main Makefile in git.git should now have\nbeen removed because it was found useless.\n\nAnd this patch puts some code back to track TCLTK_PATH properly\nwhere it should be.\n\nNote that there is already some code to do that in git-gui.\n\nAt the same time this patch creates a .gitignore and also marks\nsome targets in the Makefile as PHONY.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\nHi Paul,\n\nIn this thread:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/211641\n\nJunio asked me to send you this patch.\nSo here it is, for you to apply to your tree.\n\nThanks,\nChristian.\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.rc1.2.g8740035\n"},{"id":"205134","messageId":"7vk3sfguh2.fsf@alter.siamese.dyndns.org","threadId":"32384","inReplyTo":"20121218145753.28253.98431.chriscool@tuxfamily.org","subject":"Re: [PATCH] Makefile: track TCLTK_PATH as it used to be tracked","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-12-18T17:07:05Z","receivedAt":"2012-12-18T17:07:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> A long time ago, gitk used to live at the root of the git.git\n> repository. In 62ba514 (Move gitk to its own subdirectory,\n> 2007-11-17) it was moved to a subdirectory, but some code used\n> to track TCLTK_PATH was left in the main Makefile instead\n> of being moved to the new Makefile that was created in gitk-git/.\n>\n> The code left in the main Makefile in git.git should now have\n> been removed because it was found useless.\n>\n> And this patch puts some code back to track TCLTK_PATH properly\n> where it should be.\n\nIt is more like \"should have been moved to gitk's Makefile back\nthen, but didn't.  Make it so.\".\n\n>\n> Note that there is already some code to do that in git-gui.\n>\n> At the same time this patch creates a .gitignore and also marks\n> some targets in the Makefile as PHONY.\n>\n> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n> ---\n> Hi Paul,\n>\n> In this thread:\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/211641\n>\n> Junio asked me to send you this patch.\n> So here it is, for you to apply to your tree.\n\nPaul, just to clarify, I didn't review the contents of the patch; I\nmerely redirected the patch in the right direction, so this still\nneeds to be vetted by you ;-)\n\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\nI think in a related patch to the top-level Makefile changes it to\nlose \"1\" to read it as \"echo >&2\" here.\n"},{"id":"205141","messageId":"20121218.192310.41888431995379865.chriscool@tuxfamily.org","threadId":"32384","inReplyTo":"7vk3sfguh2.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Makefile: track TCLTK_PATH as it used to be tracked","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2012-12-18T18:23:10Z","receivedAt":"2012-12-18T18:23:10Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"From: Junio C Hamano <gitster@pobox.com>\n\n> Christian Couder <chriscool@tuxfamily.org> writes:\n> \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> \n> I think in a related patch to the top-level Makefile changes it to\n> lose \"1\" to read it as \"echo >&2\" here.\n\nYeah, I forgot to remove the 1 here.\n\nThanks,\nChristian.\n"}]}