]> 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>
Fri, 3 Oct 2025 14:48:23 +0000 (16:48 +0200)
Same method as dnsdist and rec

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
(cherry picked from commit aa22142831bdbe665dced6202d890c6e6aeb72ee)

meson.build

index 4b6aa8b85007f8910fed188daf58224987ce7e63..6ef229d64f20676699775d4c71a5c74681812eab 100644 (file)
@@ -1019,11 +1019,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,
@@ -1039,7 +1048,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')