From: Otto Moerbeek Date: Fri, 14 Feb 2025 10:58:12 +0000 (+0100) Subject: Fix meson dist issues found after new way of generating man pages was merged. X-Git-Tag: dnsdist-2.0.0-alpha1~87^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a522240fdf0d45988f26f0ca756cba83f90e117;p=thirdparty%2Fpdns.git Fix meson dist issues found after new way of generating man pages was merged. Including a path fix to the cmp command, which wrongly assumes MESON_SOURCE_ROOT was the toplevel dir. --- diff --git a/pdns/recursordist/meson-dist-script.sh b/pdns/recursordist/meson-dist-script.sh index b972994dad..ebb338d916 100755 --- a/pdns/recursordist/meson-dist-script.sh +++ b/pdns/recursordist/meson-dist-script.sh @@ -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 diff --git a/pdns/recursordist/meson.build b/pdns/recursordist/meson.build index bb999c3f2c..7c0ddd2158 100644 --- a/pdns/recursordist/meson.build +++ b/pdns/recursordist/meson.build @@ -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()