mirror of
https://github.com/curl/curl.git
synced 2026-05-16 17:36:20 +03:00
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:
parent
97a0ce8f89
commit
7aa8d1eea1
4 changed files with 14 additions and 15 deletions
|
|
@ -29,7 +29,7 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}
|
|||
|
||||
configure_file("curl_config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/curl_config.h")
|
||||
|
||||
# Get CSOURCES, HHEADERS variables
|
||||
# Get CSOURCES, HHEADERS, LIB_RCFILES variables
|
||||
curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ if(BUILD_SHARED_LIBS)
|
|||
add_library(${PROJECT_NAME}::${LIB_SHARED} ALIAS ${LIB_SHARED})
|
||||
if(WIN32)
|
||||
set_property(TARGET ${LIB_SHARED} APPEND PROPERTY SOURCES "dllmain.c")
|
||||
set_property(TARGET ${LIB_SHARED} APPEND PROPERTY SOURCES "libcurl.rc")
|
||||
set_property(TARGET ${LIB_SHARED} APPEND PROPERTY SOURCES ${LIB_RCFILES})
|
||||
if(CURL_HIDES_PRIVATE_SYMBOLS)
|
||||
set_property(TARGET ${LIB_SHARED} APPEND PROPERTY SOURCES "${PROJECT_SOURCE_DIR}/lib/libcurl.def")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -23,14 +23,17 @@
|
|||
###########################################################################
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
|
||||
# Get CSOURCES, HHEADERS, LIB_RCFILES variables
|
||||
include Makefile.inc
|
||||
|
||||
CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
|
||||
|
||||
CHECKSRC_DIST = .checksrc vauth/.checksrc vquic/.checksrc vssh/.checksrc \
|
||||
vtls/.checksrc
|
||||
vtls/.checksrc
|
||||
|
||||
EXTRA_DIST = config-mac.h config-os400.h config-plan9.h config-riscos.h \
|
||||
config-win32.h curl_config.h.in libcurl.rc libcurl.def \
|
||||
$(CMAKE_DIST) Makefile.soname optiontable.pl $(CHECKSRC_DIST)
|
||||
config-win32.h curl_config.h.in $(LIB_RCFILES) libcurl.def \
|
||||
$(CMAKE_DIST) Makefile.soname optiontable.pl $(CHECKSRC_DIST)
|
||||
|
||||
lib_LTLIBRARIES = libcurl.la
|
||||
|
||||
|
|
@ -69,9 +72,6 @@ if CURLDEBUG
|
|||
AM_CPPFLAGS += -DCURLDEBUG
|
||||
endif
|
||||
|
||||
# Get CSOURCES, HHEADERS variables
|
||||
include Makefile.inc
|
||||
|
||||
if DOING_NATIVE_WINDOWS
|
||||
CSOURCES += dllmain.c
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue