]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
autotools: use `CURLDEBUG` to exclude TrackMemory code from unity
authorViktor Szakats <commit@vsz.me>
Fri, 14 Mar 2025 02:37:37 +0000 (03:37 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 14 Mar 2025 12:27:46 +0000 (13:27 +0100)
Before this patch, autotools builds excluded TrackMemory sources
(`lib/memdebug.c` and `lib/curl_multibyte.c`) based on the `DEBUGBUILD`
setting. This works in most cases because its value is the same as
`CURLDEBUG` by default, but the correct condition is `CURLDEBUG`.

It should fix `--disable-debug --enable-curldebug --enable-unity`
builds. (not tested in CI)

It also syncs behavior with cmake builds.

Ref: #16705
Closes #16723

lib/Makefile.am
src/Makefile.am

index 209e24511fd84f8509962fca45b8f3fc146e7ab6..b8aaadab80ac2a2991e4788c3b4439223993ddb1 100644 (file)
@@ -86,7 +86,7 @@ if USE_UNITY
 # Keep these separate to avoid duplicate definitions when linking libtests
 # in static mode.
 curl_EXCLUDE = curl_threads.c timediff.c warnless.c
-if DEBUGBUILD
+if CURLDEBUG
 # We must compile these sources separately to avoid memdebug.h redefinitions
 # applying to them.
 curl_EXCLUDE += memdebug.c curl_multibyte.c
index 59406def6acd11fa799adbb3b80c7757943b04e6..dcf1e371c8760409a750027adb9147e5bb9eb317 100644 (file)
@@ -71,7 +71,7 @@ CLEANFILES =
 
 if USE_UNITY
 curl_EXCLUDE =
-if DEBUGBUILD
+if CURLDEBUG
 # We must compile this source separately to avoid memdebug.h redefinitions
 # applying to them.
 curl_EXCLUDE += ../lib/curl_multibyte.c