diff --git a/curl-autotools.sh b/curl-autotools.sh index 28b247b0e..c5629f745 100755 --- a/curl-autotools.sh +++ b/curl-autotools.sh @@ -413,13 +413,8 @@ _VER="$1" LDFLAGS_LIB+=" -Wl,--output-def,${_DEF_NAME}" fi - # If the source tarball provides these pre-built, just use them without - # trying to rebuild them. Rebuilding introduces env-specific differences - # via `nroff`. - if [ -f 'docs/curl.1' ] && \ - [ -f 'src/tool_hugehelp.c' ]; then + if [[ "${_CONFIG}" = *'nocurltool'* ]]; then options+=' --disable-manual' - CPPFLAGS+=' -DUSE_MANUAL=1' # Use pre-built manual else options+=' --enable-manual' fi diff --git a/curl-cmake.sh b/curl-cmake.sh index 261865411..94d265bdb 100755 --- a/curl-cmake.sh +++ b/curl-cmake.sh @@ -412,12 +412,8 @@ _VER="$1" options+=' -DCURL_USE_LIBPSL=OFF' fi - # If the source tarball provides these pre-built, just use them without - # trying to rebuild them. Rebuilding introduces env-specific differences - # via `nroff`. - if [ -f 'docs/curl.1' ] && \ - [ -f 'src/tool_hugehelp.c' ]; then - CPPFLAGS+=' -DUSE_MANUAL=1' # Embed pre-built manual + if [[ "${_CONFIG}" = *'nocurltool'* ]]; then + options+=' -DENABLE_CURL_MANUAL=OFF' else options+=' -DENABLE_CURL_MANUAL=ON' # Build and embed manual fi @@ -470,15 +466,6 @@ _VER="$1" "-DCMAKE_SHARED_LINKER_FLAGS=${LDFLAGS} ${LDFLAGS_LIB} ${LIBS}" # --debug-find --debug-trycompile fi - if [[ "${_CONFIG}" != *'nocurltool'* ]]; then - # When doing an out of tree build, this is necessary to avoid make - # re-generating the embedded manual with blank content. - if [ -f 'docs/curl.1' ] && \ - [ -f 'src/tool_hugehelp.c' ]; then - cp -p src/tool_hugehelp.c "${_BLDDIR}/src/" - fi - fi - SOURCE_DATE_EPOCH="${unixts}" TZ=UTC make --directory="${_BLDDIR}" --jobs="${_JOBS}" install "DESTDIR=$(pwd)/${_PKGDIR}" VERBOSE=1 # Needs BUILD_TESTING=ON to build everything # make --directory="${_BLDDIR}" --jobs="${_JOBS}" testdeps