]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix meson dist issues found after new way of generating man pages was merged.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 14 Feb 2025 10:58:12 +0000 (11:58 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 14 Feb 2025 11:14:24 +0000 (12:14 +0100)
Including a path fix to the cmp command, which wrongly assumes
MESON_SOURCE_ROOT was the toplevel dir.

pdns/recursordist/meson-dist-script.sh
pdns/recursordist/meson.build

index b972994dad2b2b2b7f98a9c529db03e6473454cb..ebb338d9162cdfe47fc02b0804caa2625edc0722 100755 (executable)
@@ -12,7 +12,7 @@ symlinks=$(find . -type l)
 
 # If these two get out-of-sync, fix it! It used to be a symlink but that can no longer be as we are
 # working with a partial checkout in the dist root dir.
-cmp "$MESON_SOURCE_ROOT"/builder-support/gen-version "$MESON_PROJECT_DIST_ROOT"/builder-support/gen-version
+cmp "$MESON_SOURCE_ROOT"/../../builder-support/gen-version "$MESON_PROJECT_DIST_ROOT"/builder-support/gen-version
 
 # Get the dereffed symbolic links (the actual files being pointed to) from the source dir
 # Extract them over the existing symbolic links
@@ -25,8 +25,8 @@ autoreconf -vi
 
 # Generate man pages
 cd "$MESON_PROJECT_BUILD_ROOT"
-ninja man-pages
-cp -vp rec-man-pages/*.1 "$MESON_PROJECT_DIST_ROOT"
+ninja pdns_recursor.1
+cp -vp *.1 "$MESON_PROJECT_DIST_ROOT"
 
 rm -rf "$MESON_PROJECT_DIST_ROOT"/autom4te.cache
 
index bb999c3f2cdf71b2bc47562cf5e5299243010ac4..7c0ddd2158567f3900ae8424cb51009336fef795 100644 (file)
@@ -588,27 +588,34 @@ 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(man_page)
+          generated_man_pages += man_page
+        endif
       endforeach
     endif
   endforeach
-  custom_target(
-     'man-pages',
-     input: man_pages,
-     output: generated_man_pages,
-     install: true,
-     install_dir: join_paths(get_option('mandir'), 'man1'),
-     command: [
-       python,
-       product_source_dir / docs_dir / 'generate-man-pages.py',
-       '--build-root', '@BUILD_ROOT@',
-       '--source-root', '@SOURCE_ROOT@',
-       '--venv-name', 'venv-rec-man-pages',
-       '--requirements-file', docs_dir / 'requirements.txt',
-       '--source-directory', docs_dir,
-       '--target-directory', '@BUILD_ROOT@',
-     ] + man_pages,
-  )
+  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,
+      install: true,
+      install_dir: join_paths(get_option('mandir'), 'man1'),
+      command: [
+        python,
+        product_source_dir / docs_dir / 'generate-man-pages.py',
+        '--build-root', '@BUILD_ROOT@',
+        '--source-root', '@SOURCE_ROOT@',
+        '--venv-name', 'venv-rec-man-pages',
+        '--requirements-file', docs_dir / 'requirements.txt',
+        '--source-directory', docs_dir,
+        '--target-directory', '@BUILD_ROOT@',
+      ] + man_pages,
+    )
+  else
+    summary('Generating man pages', false, section: 'Manual Pages')
+  endif
 endif
 
 if dep_systemd.found()