mirror of
https://github.com/curl/curl.git
synced 2026-08-25 17:03:31 +03:00
build: strip trailing spaces from libcurl.pc
Fixing: ``` $ pccritic libcurl.pc [...] [info ] file has trailing whitespace on one or more lines (style/PC062) ``` Closes #22536
This commit is contained in:
parent
419f6404d4
commit
6c7993d4d9
2 changed files with 9 additions and 2 deletions
|
|
@ -2362,6 +2362,10 @@ if(NOT CURL_DISABLE_INSTALL)
|
|||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/libcurl.pc.in"
|
||||
"${PROJECT_BINARY_DIR}/libcurl.pc" @ONLY)
|
||||
# Strip trailing spaces
|
||||
file(READ "${PROJECT_BINARY_DIR}/libcurl.pc" _libcurl_pc)
|
||||
string(REGEX REPLACE " +\n" "\n" _libcurl_pc "${_libcurl_pc}")
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/libcurl.pc" "${_libcurl_pc}")
|
||||
install(FILES "${PROJECT_BINARY_DIR}/libcurl.pc"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
||||
|
|
|
|||
|
|
@ -5555,10 +5555,13 @@ AC_CONFIG_FILES([\
|
|||
tests/http/config.ini \
|
||||
tests/http/Makefile \
|
||||
projects/Makefile \
|
||||
projects/vms/Makefile \
|
||||
libcurl.pc
|
||||
projects/vms/Makefile
|
||||
])
|
||||
AC_CONFIG_FILES([curl-config], [chmod +x curl-config])
|
||||
AC_CONFIG_FILES([libcurl.pc], [
|
||||
dnl strip trailing spaces
|
||||
"$SED" 's/ *$//g' libcurl.pc > libcurl.pc.tmp && mv libcurl.pc.tmp libcurl.pc
|
||||
], [SED="$SED"])
|
||||
AC_OUTPUT
|
||||
|
||||
SUPPORT_PROTOCOLS_LOWER=`echo "$SUPPORT_PROTOCOLS" | tr A-Z a-z`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue