git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Johannes Sixt <j6t@kdbg.org>,
	git@vger.kernel.org,  M Hickford <mirth.hickford@gmail.com>
Subject: Re: [PATCH 09/12] gitk: extract script to build Gitk
Date: Tue, 18 Feb 2025 14:25:43 -0800	[thread overview]
Message-ID: <xmqqeczuj3fc.fsf@gitster.g> (raw)
In-Reply-To: <20250218-b4-pks-meson-contrib-v1-9-c3edd292beb8@pks.im> (Patrick Steinhardt's message of "Tue, 18 Feb 2025 08:45:57 +0100")

Patrick Steinhardt <ps@pks.im> writes:

> Extract the script that "builds" Gitk from our Makefile so that we can
> reuse it in Meson.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  gitk-git/Makefile        |  7 +++----
>  gitk-git/generate-tcl.sh | 11 +++++++++++
>  2 files changed, 14 insertions(+), 4 deletions(-)

You would want to coordinate this with Johannes Sixt, who may still
want to maintain the subtree arrangement.

Thanks.


> diff --git a/gitk-git/Makefile b/gitk-git/Makefile
> index e1f0aff4a19..a396eef581e 100644
> --- a/gitk-git/Makefile
> +++ b/gitk-git/Makefile
> @@ -8,6 +8,7 @@ gitk_libdir   ?= $(sharedir)/gitk/lib
>  msgsdir    ?= $(gitk_libdir)/msgs
>  msgsdir_SQ  = $(subst ','\'',$(msgsdir))
>  
> +SHELL_PATH ?= /bin/sh
>  TCL_PATH ?= tclsh
>  TCLTK_PATH ?= wish
>  INSTALL ?= install
> @@ -63,10 +64,8 @@ clean::
>  	$(RM) gitk-wish po/*.msg GIT-TCLTK-VARS
>  
>  gitk-wish: gitk GIT-TCLTK-VARS
> -	$(QUIET_GEN)$(RM) $@ $@+ && \
> -	sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
> -	chmod +x $@+ && \
> -	mv -f $@+ $@
> +	$(QUIET_GEN)$(RM) $@ $@+
> +	$(QUIET_GEN)$(SHELL_PATH) ./generate-tcl.sh "$(TCLTK_PATH_SQ)" "$<" "$@"
>  
>  $(PO_TEMPLATE): gitk
>  	$(XGETTEXT) -kmc -LTcl -o $@ gitk
> diff --git a/gitk-git/generate-tcl.sh b/gitk-git/generate-tcl.sh
> new file mode 100755
> index 00000000000..46bba6d2464
> --- /dev/null
> +++ b/gitk-git/generate-tcl.sh
> @@ -0,0 +1,11 @@
> +#!/bin/sh
> +
> +set -e
> +
> +WISH=$(echo "$1" | sed 's/|/\\|/g')
> +INPUT="$2"
> +OUTPUT="$3"
> +
> +sed -e "1,3s|^exec .* \"\$0\"|exec $WISH \"\$0\"|" "$INPUT" >"$OUTPUT"+
> +chmod a+x "$OUTPUT"+
> +mv "$OUTPUT"+ "$OUTPUT"

  reply	other threads:[~2025-02-18 22:25 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18  7:45 [PATCH 00/12] meson: wire up bits and pieces from "contrib/" Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 01/12] GIT-BUILD-OPTIONS: propagate project's source directory Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 02/12] contrib/credential: fix "netrc" tests with out-of-tree builds Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 03/12] contrib/credential: fix compilation of wincred helper with MSVC Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 04/12] contrib/credential: fix compiling "libsecret" helper Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 05/12] contrib/credential: fix compilation of "osxkeychain" helper Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 06/12] meson: wire up credential helpers Patrick Steinhardt
2025-02-18 10:11   ` M Hickford
2025-02-18 11:13     ` Patrick Steinhardt
2025-03-29  7:15       ` M Hickford
2025-03-31  6:55         ` Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 07/12] meson: wire up git-contacts(1) Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 08/12] meson: wire up static analysis via Coccinelle Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 09/12] gitk: extract script to build Gitk Patrick Steinhardt
2025-02-18 22:25   ` Junio C Hamano [this message]
2025-02-19  5:53     ` Patrick Steinhardt
2025-02-19 11:42       ` Johannes Sixt
2025-02-19 11:51         ` Patrick Steinhardt
2025-02-19 17:32           ` Johannes Sixt
2025-02-18  7:45 ` [PATCH 10/12] meson: wire up Gitk Patrick Steinhardt
2025-02-18  7:45 ` [PATCH 11/12] ci: fix propagating UTF-8 test locale in musl-based Meson job Patrick Steinhardt
2025-02-18  7:46 ` [PATCH 12/12] ci: exercise credential helpers Patrick Steinhardt
2025-02-18 10:10 ` [PATCH 00/12] meson: wire up bits and pieces from "contrib/" M Hickford
2025-02-19 13:13 ` [PATCH v2 00/10] " Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 01/10] GIT-BUILD-OPTIONS: propagate project's source directory Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 02/10] contrib/credential: fix "netrc" tests with out-of-tree builds Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 03/10] contrib/credential: fix compilation of wincred helper with MSVC Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 04/10] contrib/credential: fix compiling "libsecret" helper Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 05/10] contrib/credential: fix compilation of "osxkeychain" helper Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 06/10] meson: wire up credential helpers Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 07/10] meson: wire up git-contacts(1) Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 08/10] meson: wire up static analysis via Coccinelle Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 09/10] ci: fix propagating UTF-8 test locale in musl-based Meson job Patrick Steinhardt
2025-02-19 13:13   ` [PATCH v2 10/10] ci: exercise credential helpers Patrick Steinhardt
2025-02-20  1:25   ` [-SPAM-] [PATCH v2 00/10] meson: wire up bits and pieces from "contrib/" Ramsay Jones
2025-02-20  6:25     ` Patrick Steinhardt
2025-02-21 19:50       ` Ramsay Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqeczuj3fc.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=mirth.hickford@gmail.com \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).