Skip to content

Commit

Permalink
build: drop tool_hugehelp.c.cvs, tidy up macros, drop buildconf.bat
Browse files Browse the repository at this point in the history
Rework the way `tool_hugehelp.c` is included in builds.

After this patch, with `./configure` and CMake `tool_hugehelp.c` is only
compiled when building with manuals enabled. With manuals disabled this
source file is not used anymore. The method is similar to how
8a3740b implemented `tool_ca_embed.c`.
`./configure` always generates it as before, otherwise the build fails.

- winbuild: rework to not need `buildconf.bat`, but automatically use
  `tool_hugehelp.c` if present (e.g. when building from an official
  source tarball) and enable `USE_MANUAL` accordingly.

- `buildconf.bat`: after dropping `tool_hugehelp.c` generation, the only
  logic left was `cp Makefile.dist Makefile`. This allowed to launch
  winbuild builds via GNU Make in a Git repo. Drop this option together
  with the batch file.

- build `libcurltool` without `USE_MANUAL` macro to exclude the manual
  and the dependence on the generator commands. Drop relying on
  `UNITTESTS` for this purpose.
  Follow-up to 96843f4 curl#16068

- `src/mkhelp.pl`: include `tool_hugehelp.h` before using `USE_MANUAL`
  to have it set in `config-*.h` builds with source tarballs created
  with manual but without zlib.

Closes curl#16081
  • Loading branch information
vszakats committed Jan 26, 2025
1 parent 1a36923 commit 0035ff4
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 374 deletions.
1 change: 0 additions & 1 deletion .github/scripts/distfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ gitonly=".git*
^scripts/installcheck.sh
^scripts/release-notes.pl
^scripts/singleuse.pl
^src/tool_hugehelp.c.cvs
^tests/CI.md"

tarfiles="$(mktemp)"
Expand Down
4 changes: 0 additions & 4 deletions GIT-INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ Daniel uses a configure line similar to this for easier development:

./configure --disable-shared --enable-debug --enable-maintainer-mode

In environments that do not support configure (i.e. Windows), do this:

buildconf.bat

## REQUIREMENTS

See [docs/INTERNALS.md][0] for requirement details.
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ PLAN9_DIST = plan9/include/mkfile \

EXTRA_DIST = CHANGES.md COPYING Makefile.dist \
RELEASE-NOTES $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) \
$(PLAN9_DIST) buildconf.bat Dockerfile
$(PLAN9_DIST) Dockerfile

DISTCLEANFILES = buildinfo.txt

Expand Down
19 changes: 2 additions & 17 deletions Makefile.dist
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,13 @@ ssl:
./configure --with-openssl
make

vc:
cd winbuild
nmake /f Makefile.vc MACHINE=x86

vc-x64:
cd winbuild
nmake /f Makefile.vc MACHINE=x64

cygwin:
./configure
make

cygwin-ssl:
./configure --with-openssl
make
cygwin: all
cygwin-ssl: ssl

unix: all

unix-ssl: ssl

linux: all

linux-ssl: ssl

ca-bundle: scripts/mk-ca-bundle.pl
Expand Down
2 changes: 0 additions & 2 deletions appveyor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ elif [ "${BUILD_SYSTEM}" = 'VisualStudioSolution' ]; then
)
curl="build/Win32/${VC_VERSION}/${PRJ_CFG}/curld.exe"
elif [ "${BUILD_SYSTEM}" = 'winbuild_vs2015' ]; then
./buildconf.bat
(
cd winbuild
cat << EOF > _make.bat
Expand All @@ -88,7 +87,6 @@ EOF
)
curl="builds/libcurl-vc14-x64-${PATHPART}-dll-ssl-dll-ipv6-sspi/bin/curl.exe"
elif [ "${BUILD_SYSTEM}" = 'winbuild_vs2017' ]; then
./buildconf.bat
(
cd winbuild
cat << EOF > _make.bat
Expand Down
265 changes: 0 additions & 265 deletions buildconf.bat

This file was deleted.

4 changes: 0 additions & 4 deletions docs/HTTP3.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,6 @@ prompt](../winbuild/README.md#open-a-command-prompt)):
% cd curl/winbuild
% nmake /f Makefile.vc mode=dll WITH_MSH3=dll MSH3_PATH="C:/Program Files/msh3" MACHINE=x64

**Note** - If you encounter a build error with `tool_hugehelp.c` being
missing, rename `tool_hugehelp.c.cvs` in the same directory to
`tool_hugehelp.c` and then run `nmake` again.

Run in the `C:/Program Files/msh3/lib` directory, copy `curl.exe` to that
directory, or copy `msquic.dll` and `msh3.dll` from that directory to the
`curl.exe` directory. For example:
Expand Down
5 changes: 0 additions & 5 deletions lib/config-win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,6 @@ Vista
# endif /* UNDER_CE */
#endif /* !CURL_OS */

/* If you want to build curl with the built-in manual */
#ifndef UNDER_CE
#define USE_MANUAL 1
#endif

/* ---------------------------------------------------------------- */
/* Windows CE */
/* ---------------------------------------------------------------- */
Expand Down
Loading

0 comments on commit 0035ff4

Please sign in to comment.