Skip to content

Commit b4c06f7

Browse files
committed
gitk: introduce support for the Meson build system
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 <[email protected]>
1 parent 0d4fe30 commit b4c06f7

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

meson.build

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
project('gitk')
2+
3+
shell = find_program('sh')
4+
wish = find_program('wish')
5+
6+
# Verify that dependencies of "generate-tcl.sh" are satisfied.
7+
foreach dependency : [ 'chmod', 'mv', 'sed' ]
8+
find_program(dependency)
9+
endforeach
10+
11+
custom_target(
12+
command: [
13+
shell,
14+
meson.current_source_dir() / 'generate-tcl.sh',
15+
wish.full_path(),
16+
'@INPUT@',
17+
'@OUTPUT@',
18+
],
19+
input: 'gitk',
20+
output: 'gitk',
21+
depend_files: [
22+
'generate-tcl.sh',
23+
],
24+
install: true,
25+
install_dir: get_option('bindir'),
26+
)
27+
28+
if find_program('msgfmt').found()
29+
subdir('po')
30+
endif

po/meson.build

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import('i18n').gettext('gitk',
2+
languages: [
3+
'bg',
4+
'ca',
5+
'de',
6+
'es',
7+
'fr',
8+
'hu',
9+
'it',
10+
'ja',
11+
'pt_br',
12+
'pt_pt',
13+
'ru',
14+
'sv',
15+
'vi',
16+
'zh_cn',
17+
],
18+
install: true,
19+
)

0 commit comments

Comments
 (0)