]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
doc: Install pre-compiled man pages to the correct path
authorDaniel Wagner <dwagner@suse.de>
Tue, 30 Aug 2022 14:03:56 +0000 (16:03 +0200)
committerDaniel Wagner <dwagner@suse.de>
Tue, 30 Aug 2022 14:03:56 +0000 (16:03 +0200)
The install_subdir('man', ...) command installs the man pages under
$mandir/man/ instead of $mandir. Use and external script to get the
list of man pages to avoid having to list all the man pages
explicitly.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
doc/list-pre-compiled.sh [new file with mode: 0755]
doc/meson.build

diff --git a/doc/list-pre-compiled.sh b/doc/list-pre-compiled.sh
new file mode 100755 (executable)
index 0000000..c31caf9
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+for i in man/*.2; do
+  echo $i
+done
index d716c8b54cb9f1f2a85864b66c10a3b064ce7618..60a92ed421a95174a105ab6978b58ffce9bc2d12 100644 (file)
@@ -85,7 +85,10 @@ if want_docs != 'false'
       endforeach
     else
       if want_docs == 'all' or want_docs == 'man'
-        install_subdir('man', install_dir: mandir)
+        list_pre_compiled = find_program('list-pre-compiled.sh')
+        m = run_command(list_pre_compiled, check: true)
+        man_pages = m.stdout().strip().split('\n')
+        install_data(man_pages, install_dir: mandir)
       endif
     endif
   endif