diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2020-04-16 23:32:02 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-10-02 12:07:05 +0300 |
commit | deeca54f644aba1d73b785b6eb36cd1d23e404cc (patch) | |
tree | 6ae858ddd806c94b98f197758a424038ed232117 /doc | |
parent | 7ccda091c2c7cf18225b861962f952dc04a5295f (diff) | |
download | apk-tools-deeca54f644aba1d73b785b6eb36cd1d23e404cc.tar.gz apk-tools-deeca54f644aba1d73b785b6eb36cd1d23e404cc.tar.bz2 apk-tools-deeca54f644aba1d73b785b6eb36cd1d23e404cc.tar.xz apk-tools-deeca54f644aba1d73b785b6eb36cd1d23e404cc.zip |
build: add support for building with meson
Diffstat (limited to 'doc')
-rw-r--r-- | doc/meson.build | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/meson.build b/doc/meson.build new file mode 100644 index 0000000..6142884 --- /dev/null +++ b/doc/meson.build @@ -0,0 +1,46 @@ +scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) +sh = find_program('sh', native: true) +mandir = get_option('mandir') + +man_files = [ + 'apk.8.scd', + 'apk-add.8.scd', + 'apk-audit.8.scd', + 'apk-cache.5.scd', + 'apk-cache.8.scd', + 'apk-del.8.scd', + 'apk-dot.8.scd', + 'apk-fetch.8.scd', + 'apk-fix.8.scd', + 'apk-index.8.scd', + 'apk-info.8.scd', + 'apk-keys.5.scd', + 'apk-list.8.scd', + 'apk-manifest.8.scd', + 'apk-policy.8.scd', + 'apk-repositories.5.scd', + 'apk-stats.8.scd', + 'apk-update.8.scd', + 'apk-upgrade.8.scd', + 'apk-verify.8.scd', + 'apk-version.8.scd', + 'apk-world.5.scd', +] + +foreach filename : man_files + topic = filename.split('.')[-3].split('/')[-1] + section = filename.split('.')[-2] + output = '@0@.@1@'.format(topic, section) + + custom_target( + output, + input: filename, + capture: true, + output: output, + command: [ + sh, '-c', '@0@ < @INPUT@'.format(scdoc_prog.path()) + ], + install: true, + install_dir: '@0@/man@1@'.format(mandir, section) + ) +endforeach
\ No newline at end of file |