build: tidy up Makefile.inc use in lib and src

- cmake: use `CURL_RCFILES` instead of literal.
- cmake: use `LIB_RCFILES` instead of literal.
- cmake: fix comments.
- autotools: use `CURL_RCFILES` in `EXTRA_DIST`.
- autotools: use `LIB_RCFILES` in `EXTRA_DIST`.
- autotools: fix comments.
- autotools: fix indentation.

Closes #17694
This commit is contained in:
Viktor Szakats 2025-06-21 11:03:54 +02:00
parent 97a0ce8f89
commit 7aa8d1eea1
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 14 additions and 15 deletions

View file

@ -66,12 +66,12 @@ if(CURL_CA_EMBED_SET)
endif()
endif()
# Get CURL_CFILES, CURLX_CFILES, CURL_HFILES variables
# Get CURL_FILES, CURL_CFILES, CURL_HFILES, CURLX_CFILES, CURLX_HFILES, CURL_RCFILES variables
curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
if(WIN32)
list(APPEND CURL_CFILES "curl.rc")
list(APPEND CURL_CFILES ${CURL_RCFILES})
endif()
if(BUILD_STATIC_CURL)

View file

@ -26,8 +26,11 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# remove targets if the command fails
.DELETE_ON_ERROR:
# Get CURL_FILES, CURL_CFILES, CURL_HFILES, CURLX_CFILES, CURLX_HFILES, CURL_RCFILES variables
include Makefile.inc
EXTRA_DIST = mk-file-embed.pl mkhelp.pl \
curl.rc Makefile.inc CMakeLists.txt .checksrc
$(CURL_RCFILES) Makefile.inc CMakeLists.txt .checksrc
# Specify our include paths here, and do it relative to $(top_srcdir) and
# $(top_builddir), to ensure that these paths which belong to the library
@ -65,9 +68,6 @@ if USE_UNICODE
UNICODEFLAG = -municode
endif
# Get CURL_CFILES, CURLX_CFILES, CURL_HFILES variables
include Makefile.inc
curl_cfiles_gen =
curl_hfiles_gen =
CLEANFILES =
@ -86,7 +86,6 @@ nodist_curl_SOURCES = curltool_unity.c
curl_SOURCES =
CLEANFILES += curltool_unity.c
else
# CURL_FILES comes from Makefile.inc
curl_SOURCES = $(CURL_FILES) $(curl_cfiles_gen) $(curl_hfiles_gen)
endif
if HAVE_WINDRES