From: Remi Gacogne Date: Mon, 23 Jun 2025 08:42:56 +0000 (+0200) Subject: dnsdist: Generate files when building the release tarball X-Git-Tag: dnsdist-2.0.0-rc1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=171bb98f4ee759c515b0c3bd95a85c0176c66f3d;p=thirdparty%2Fpdns.git dnsdist: Generate files when building the release tarball Some build systems are very unhappy with `dnsdist-rust-lib/rust/src/lib.rs` not existing before actually starting the build process (mostly because of `cargo-vendor`), so let's make their life easier. Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist-rust-lib/meson.build b/pdns/dnsdistdist/dnsdist-rust-lib/meson.build index b752e9b413..7f71c01303 100644 --- a/pdns/dnsdistdist/dnsdist-rust-lib/meson.build +++ b/pdns/dnsdistdist/dnsdist-rust-lib/meson.build @@ -18,6 +18,7 @@ generated = [ python = find_program('python3') rust_lib_sources = custom_target( + 'rust-lib-sources', command: [python, '@INPUT0@', '@SOURCE_ROOT@', '@SOURCE_ROOT@/dnsdist-rust-lib', '@OUTDIR@'], input: sources, output: generated, diff --git a/pdns/dnsdistdist/meson-dist-script.sh b/pdns/dnsdistdist/meson-dist-script.sh index 67755c1a24..4cf1028747 100755 --- a/pdns/dnsdistdist/meson-dist-script.sh +++ b/pdns/dnsdistdist/meson-dist-script.sh @@ -24,15 +24,28 @@ tar -C "$MESON_SOURCE_ROOT" -hcf - $symlinks | tar -xf - -C "$MESON_PROJECT_DIST echo Running autoreconf -vi so distfile is still usable for autotools building # Run autoconf for people using autotools to build, this creates a configure sc autoreconf -vi +rm -rf "$MESON_PROJECT_DIST_ROOT"/autom4te.cache -# Generate man pages cd "$MESON_PROJECT_BUILD_ROOT" -meson compile man-pages -cp -vp *.1 "$MESON_PROJECT_DIST_ROOT" -rm -rf "$MESON_PROJECT_DIST_ROOT"/autom4te.cache +# Generate YAML documentation +meson compile yaml-settings-docs +cp -vp "$MESON_SOURCE_ROOT"/docs/reference/yaml-*.rst "$MESON_PROJECT_DIST_ROOT"/docs/reference/ # Generate a few files to reduce build dependencies echo 'If the below command generates an error, remove dnslabeltext.cc from source dir (remains of an autotools build?) and start again with a clean meson setup' ninja libdnsdist-common.a.p/dnslabeltext.cc cp -vp libdnsdist-common.a.p/dnslabeltext.cc "$MESON_PROJECT_DIST_ROOT" + +# Generate rules (selectors, actions) +meson compile rules +cp -vp dnsdist-*generated.hh dnsdist-*generated-body.hh "$MESON_PROJECT_DIST_ROOT" + +# Generate the sources for our Rust-based library +meson compile rust-lib-sources +cp -vp dnsdist-rust-lib/*.cc *.hh "$MESON_PROJECT_DIST_ROOT"/dnsdist-rust-lib/ +cp -vp "$MESON_SOURCE_ROOT"/dnsdist-rust-lib/rust/src/lib.rs "$MESON_PROJECT_DIST_ROOT"/dnsdist-rust-lib/rust/src/ + +# Generate man pages +meson compile man-pages +cp -vp *.1 "$MESON_PROJECT_DIST_ROOT" diff --git a/pdns/dnsdistdist/meson.build b/pdns/dnsdistdist/meson.build index 7b2848785e..92ba36f633 100644 --- a/pdns/dnsdistdist/meson.build +++ b/pdns/dnsdistdist/meson.build @@ -327,6 +327,7 @@ py = import('python') python = py.find_installation('python3', required: true) selectors_actions_sources = custom_target( + 'rules', command: [ python, '@INPUT0@',