]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
This does not try to generate the man pages if they are found in the tarball
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 11 Sep 2025 14:07:10 +0000 (16:07 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Wed, 1 Oct 2025 09:52:14 +0000 (11:52 +0200)
Same method as dnsdist and rec

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
meson.build

index a7cdbed9ac2dfb294393165c91eb4280391695d7..695e50eb731eca02fbc0f71ba210f2f64a51892d 100644 (file)
@@ -1021,11 +1021,20 @@ if python.found()
   foreach tool, info: tools
     if 'manpages' in info
       foreach man_page: info['manpages']
-        generated_man_pages += man_page
+        if not fs.is_file('docs' / man_page)
+          generated_man_pages += man_page
+        else
+          install_man(
+            'docs' / man_page,
+            install_dir: join_paths(get_option('mandir'), 'man1'),
+          )
+        endif
       endforeach
     endif
   endforeach
-  custom_target(
+  if generated_man_pages.length() != 0
+    summary('Generating man pages', true, section: 'Manual Pages')
+    custom_target(
      'man-pages',
      input: man_pages,
      output: generated_man_pages,
@@ -1041,7 +1050,10 @@ if python.found()
        '--source-directory', docs_dir,
        '--target-directory', '@BUILD_ROOT@',
      ] + man_pages,
-  )
+    )
+  else
+    summary('Generating man pages', false, section: 'Manual Pages')
+  endif
 endif
 
 if get_option('unit-tests')