From: Viktor Szakats Date: Fri, 14 Mar 2025 02:37:37 +0000 (+0100) Subject: autotools: use `CURLDEBUG` to exclude TrackMemory code from unity X-Git-Tag: curl-8_13_0~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d36f164e612cb4f2395851af7b7b71e7fee0393b;p=thirdparty%2Fcurl.git autotools: use `CURLDEBUG` to exclude TrackMemory code from unity 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 --- diff --git a/lib/Makefile.am b/lib/Makefile.am index 209e24511f..b8aaadab80 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index 59406def6a..dcf1e371c8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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