build: if no perl, fix to use the pre-built hugehelp, if present

- cmake: Before this patch a missing perl disabled the curl manual.
  After this patch, it automatically picks up a pre-built hugehelp,
  if present (= when building from a release tarball).
  Follow-up to 0035ff45c5 #16081

- autotools: Rework behavior when perl is missing. Before this patch
  it caused a hard error when docs/manual/ca-embed were enabled.
  Of these, docs were enabled by default. After this patch, doc
  generation is automatically skipped, with a warning. Manual generation
  falls back to using a pre-built hugehelp, or a stub if that's missing.
  CA-embed is automatically skipped, with a warning.
  Slight difference from cmake: When built with no perl and no pre-built
  hugehelp, the manual is enabled, but the content is empty; with cmake
  it's disabled proper.
  Follow-up to 137aecfbf1 #13514
  Follow-up to 541321507e #12857

Also:
- GHA/distcheck: verify if the pre-built hugehelp makes it into curl.
- GHA/distcheck: streamline disabling perl with autotools.
- GHA/distcheck: `--disable-docs` no longer required to build without perl.
  Passing it also implicitly disables the curl manual, which is
  undesired in these tests.
- cmake: drop redundant `HAVE_MANUAL_TOOLS` interim variable.
- cmake: move two `set()` lines close to their counterparts.

Follow-up to 25119fbaaa #18104

Closes #18118
This commit is contained in:
Viktor Szakats 2025-07-31 16:38:34 +02:00
parent 18e00c8ed0
commit 54da6f5a32
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
6 changed files with 63 additions and 54 deletions

View file

@ -113,7 +113,7 @@ jobs:
make test-ci
make install
curl-install/bin/curl --disable --version
curl-install/bin/curl --manual | wc -l
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
popd
scripts/checksrc-all.pl
@ -127,9 +127,6 @@ jobs:
with:
name: 'release-tgz'
- name: 'disable preinstalled perl'
run: sudo mv "$(command -v perl)" "$(command -v perl)"-disabled
- name: 'build & install'
run: |
echo "::stop-commands::$(uuidgen)"
@ -137,11 +134,11 @@ jobs:
pushd curl-99.98.97
mkdir build
pushd build
../configure --prefix="$PWD"/curl-install --enable-werror --without-ssl --without-libpsl --disable-docs
../configure --prefix="$PWD"/curl-install --enable-werror --without-ssl --without-libpsl ac_cv_path_PERL=
make
make install
curl-install/bin/curl --disable --version
curl-install/bin/curl --manual | wc -l
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
popd
verify-in-tree-autotools:
@ -154,19 +151,16 @@ jobs:
with:
name: 'release-tgz'
- name: 'disable preinstalled perl'
run: sudo mv "$(command -v perl)" "$(command -v perl)"-disabled
- name: 'build & install'
run: |
echo "::stop-commands::$(uuidgen)"
tar xvf curl-99.98.97.tar.gz
pushd curl-99.98.97
./configure --prefix="$PWD"/curl-install --enable-werror --without-ssl --without-libpsl --disable-docs
./configure --prefix="$PWD"/curl-install --enable-werror --without-ssl --without-libpsl ac_cv_path_PERL=
make
make install
curl-install/bin/curl --disable --version
curl-install/bin/curl --manual | wc -l
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
verify-out-of-tree-cmake:
name: 'CM out-of-tree !perl'
@ -188,7 +182,7 @@ jobs:
cmake --install build
export LD_LIBRARY_PATH="$PWD/curl-install/lib:$LD_LIBRARY_PATH"
curl-install/bin/curl --disable --version
curl-install/bin/curl --manual | wc -l
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
verify-in-tree-cmake:
name: 'CM in-tree !perl'
@ -210,7 +204,7 @@ jobs:
cmake --install .
export LD_LIBRARY_PATH="$PWD/curl-install/lib:$LD_LIBRARY_PATH"
curl-install/bin/curl --disable --version
curl-install/bin/curl --manual | wc -l
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
missing-files:
name: 'missing files'