* [PATCH v3 3/4] gitk-git/Makefile: track TCLTK_PATH as it used to be tracked
@ 2012-12-17 7:17 Christian Couder
2012-12-17 7:33 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Christian Couder @ 2012-12-17 7:17 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In 62ba514 (Move gitk to its own subdirectory, 2007-11-17) some
code used to track TCLTK_PATH was left in the main Makefile instead
of being moved to the new Makefile that was created in gitk-git/.
The code left in the main Makefile should have been removed by a
previous patch in the same series as this one.
And this patch puts some code back to track TCLTK_PATH properly
where it should be, that is in gitk-git/Makefile.
Note that there is already some code to do that in git-gui/Makefile.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
.gitignore | 1 -
gitk-git/.gitignore | 2 ++
gitk-git/Makefile | 16 ++++++++++++++--
3 files changed, 16 insertions(+), 3 deletions(-)
create mode 100644 gitk-git/.gitignore
diff --git a/.gitignore b/.gitignore
index 086c5af..56a4b2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -171,7 +171,6 @@
/git-whatchanged
/git-write-tree
/git-core-*/?*
-/gitk-git/gitk-wish
/gitweb/GITWEB-BUILD-OPTIONS
/gitweb/gitweb.cgi
/gitweb/static/gitweb.js
diff --git a/gitk-git/.gitignore b/gitk-git/.gitignore
new file mode 100644
index 0000000..d7ebcaf
--- /dev/null
+++ b/gitk-git/.gitignore
@@ -0,0 +1,2 @@
+/GIT-TCLTK-VARS
+/gitk-wish
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index e1b6045..5acdc90 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/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
--
1.8.1.rc1.2.g8740035
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3 3/4] gitk-git/Makefile: track TCLTK_PATH as it used to be tracked
2012-12-17 7:17 [PATCH v3 3/4] gitk-git/Makefile: track TCLTK_PATH as it used to be tracked Christian Couder
@ 2012-12-17 7:33 ` Junio C Hamano
2012-12-18 15:12 ` Christian Couder
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2012-12-17 7:33 UTC (permalink / raw)
To: Christian Couder; +Cc: git
Christian Couder <chriscool@tuxfamily.org> writes:
> In 62ba514 (Move gitk to its own subdirectory, 2007-11-17) some
> code used to track TCLTK_PATH was left in the main Makefile instead
> of being moved to the new Makefile that was created in gitk-git/.
>
> The code left in the main Makefile should have been removed by a
> previous patch in the same series as this one.
>
> And this patch puts some code back to track TCLTK_PATH properly
> where it should be, that is in gitk-git/Makefile.
>
> Note that there is already some code to do that in git-gui/Makefile.
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
> .gitignore | 1 -
> gitk-git/.gitignore | 2 ++
> gitk-git/Makefile | 16 ++++++++++++++--
I'll apply the .gitignore part to my tree, but could you split the
rest out and have Paul apply to his tree at
git://ozlabs.org/~paulus/gitk.git
> 3 files changed, 16 insertions(+), 3 deletions(-)
> create mode 100644 gitk-git/.gitignore
>
> diff --git a/.gitignore b/.gitignore
> index 086c5af..56a4b2b 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -171,7 +171,6 @@
> /git-whatchanged
> /git-write-tree
> /git-core-*/?*
> -/gitk-git/gitk-wish
> /gitweb/GITWEB-BUILD-OPTIONS
> /gitweb/gitweb.cgi
> /gitweb/static/gitweb.js
> diff --git a/gitk-git/.gitignore b/gitk-git/.gitignore
> new file mode 100644
> index 0000000..d7ebcaf
> --- /dev/null
> +++ b/gitk-git/.gitignore
> @@ -0,0 +1,2 @@
> +/GIT-TCLTK-VARS
> +/gitk-wish
> diff --git a/gitk-git/Makefile b/gitk-git/Makefile
> index e1b6045..5acdc90 100644
> --- a/gitk-git/Makefile
> +++ b/gitk-git/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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 3/4] gitk-git/Makefile: track TCLTK_PATH as it used to be tracked
2012-12-17 7:33 ` Junio C Hamano
@ 2012-12-18 15:12 ` Christian Couder
0 siblings, 0 replies; 3+ messages in thread
From: Christian Couder @ 2012-12-18 15:12 UTC (permalink / raw)
To: gitster; +Cc: git
From: Junio C Hamano <gitster@pobox.com>
>
>> .gitignore | 1 -
>> gitk-git/.gitignore | 2 ++
>> gitk-git/Makefile | 16 ++++++++++++++--
>
> I'll apply the .gitignore part to my tree, but could you split the
> rest out and have Paul apply to his tree at
>
> git://ozlabs.org/~paulus/gitk.git
Ok, I just sent the rest to Paul and I am going to send you an updated
series for you.
Regards,
Christian.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-18 15:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-17 7:17 [PATCH v3 3/4] gitk-git/Makefile: track TCLTK_PATH as it used to be tracked Christian Couder
2012-12-17 7:33 ` Junio C Hamano
2012-12-18 15:12 ` Christian Couder
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).