summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-05-07 12:38:21 +0200
committerTimo Teräs <timo.teras@iki.fi>2020-10-09 16:09:19 +0300
commit718e07f78a6f5a5a1c5c1a961308bd85afb4db30 (patch)
tree52ee310d78da61233b78bd4457d2394ffcd9145b /doc
parentfe1de720d02ae91856ec966801f69b1f1a8e3168 (diff)
downloadapk-tools-718e07f78a6f5a5a1c5c1a961308bd85afb4db30.tar.gz
apk-tools-718e07f78a6f5a5a1c5c1a961308bd85afb4db30.tar.bz2
apk-tools-718e07f78a6f5a5a1c5c1a961308bd85afb4db30.tar.xz
apk-tools-718e07f78a6f5a5a1c5c1a961308bd85afb4db30.zip
build: build help.h with meson
Diffstat (limited to 'doc')
-rw-r--r--doc/meson.build46
1 files changed, 24 insertions, 22 deletions
diff --git a/doc/meson.build b/doc/meson.build
index 6142884..f6d4878 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1,8 +1,4 @@
-scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
-sh = find_program('sh', native: true)
-mandir = get_option('mandir')
-
-man_files = [
+man_files = files(
'apk.8.scd',
'apk-add.8.scd',
'apk-audit.8.scd',
@@ -25,22 +21,28 @@ man_files = [
'apk-verify.8.scd',
'apk-version.8.scd',
'apk-world.5.scd',
-]
+)
+
+if scdoc_dep.found()
+ scdoc_prog = find_program(scdoc_dep.get_pkgconfig_variable('scdoc'), native: true)
+ sh = find_program('sh', native: true)
+ mandir = get_option('mandir')
-foreach filename : man_files
- topic = filename.split('.')[-3].split('/')[-1]
- section = filename.split('.')[-2]
- output = '@0@.@1@'.format(topic, section)
+ foreach filename : man_files
+ topic = '@0@'.format(filename).split('.')[-3].split('/')[-1]
+ section = '@0@'.format(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
+ 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
+endif