Skip to content

Conversation

pks-t
Copy link
Contributor

@pks-t pks-t commented Feb 19, 2025

Upstream Git has introduced support for the Meson build system.
Introduce support for Meson into gitk, as well, so that Git can easily
build its vendored copy of Gitk via a subproject() directive. The
instructions can be set up as follows:

$ meson setup build
$ meson compile -C build
$ meson install -C build

Specific options, like for example where Gitk shall be installed to, can
be specified at setup time via -D. Available options can be discovered
by running meson configure either in the source or build directory.

These patches have been split out of an upstream patch series as discussed.

@j6t
Copy link
Owner

j6t commented Feb 19, 2025

Thank you. Kindly prefix commit titles with gitk: (and the name "Gitk" need then not be repeated). Other title prefixes aren't needed as the project is sufficiently small.

In this change:

 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)" "$<" "$@"

please keep the && chain, because otherwise I see the message twice:

gitk@ps/meson-build:1019> make
    GEN gitk-wish
    GEN gitk-wish

I haven't tested the meson build. I trust it works as designed.

Extract the scrip that "builds" Gitk from our Makefile so that we can
reuse it in Meson.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Upstream Git has introduced support for the Meson build system.
Introduce support for Meson into gitk, as well, so that Git can easily
build its vendored copy of Gitk via a `subproject()` directive. The
instructions can be set up as follows:

  $ meson setup build
  $ meson compile -C build
  $ meson install -C build

Specific options, like for example where Gitk shall be installed to, can
be specified at setup time via `-D`. Available options can be discovered
by running `meson configure` either in the source or build directory.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
@pks-t pks-t force-pushed the pks-meson-support branch from c7a7c58 to b4c06f7 Compare February 20, 2025 07:52
@pks-t
Copy link
Contributor Author

pks-t commented Feb 20, 2025

@j6t Thanks, I've addressed both comments 👍

@j6t j6t merged commit 4a6cc6a into j6t:master Feb 20, 2025
@pks-t pks-t deleted the pks-meson-support branch April 4, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants