New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put CURLDEBUG and DEBUGBUILD in lib/curl_config.h. #2548

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@gevaerts
Contributor

gevaerts commented May 4, 2018

This ensures that make dependency tracking will force a rebuild whenever
configure --enable-debug or --enable-curldebug changes.

The defines are still passed on the compiler commandline as well. That's
not ideal, but the m4 code is a bit daunting.

@bagder bagder added the build label May 4, 2018

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder May 4, 2018

Member

I ripped them out like this (after I applied your comit) and I see no issues:

diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 20bdbd706..c1ae6a559 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -3,11 +3,11 @@
 #  Project                     ___| | | |  _ \| |
 #                             / __| | | | |_) | |
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
 # are also available at https://curl.haxx.se/docs/copyright.html.
 #
@@ -1297,19 +1297,10 @@ AC_DEFUN([CURL_CHECK_CURLDEBUG], [
     if test "$supports_curldebug" = "no"; then
       AC_MSG_WARN([cannot enable curl debug memory tracking.])
       want_curldebug="no"
     fi
   fi
-  #
-  if test "$want_curldebug" = "yes"; then
-    CPPFLAGS="-DCURLDEBUG $CPPFLAGS"
-    squeeze CPPFLAGS
-  fi
-  if test "$want_debug" = "yes"; then
-    CPPFLAGS="-DDEBUGBUILD $CPPFLAGS"
-    squeeze CPPFLAGS
-  fi
 ])
 
 
 
 dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
Member

bagder commented May 4, 2018

I ripped them out like this (after I applied your comit) and I see no issues:

diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 20bdbd706..c1ae6a559 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -3,11 +3,11 @@
 #  Project                     ___| | | |  _ \| |
 #                             / __| | | | |_) | |
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
 # are also available at https://curl.haxx.se/docs/copyright.html.
 #
@@ -1297,19 +1297,10 @@ AC_DEFUN([CURL_CHECK_CURLDEBUG], [
     if test "$supports_curldebug" = "no"; then
       AC_MSG_WARN([cannot enable curl debug memory tracking.])
       want_curldebug="no"
     fi
   fi
-  #
-  if test "$want_curldebug" = "yes"; then
-    CPPFLAGS="-DCURLDEBUG $CPPFLAGS"
-    squeeze CPPFLAGS
-  fi
-  if test "$want_debug" = "yes"; then
-    CPPFLAGS="-DDEBUGBUILD $CPPFLAGS"
-    squeeze CPPFLAGS
-  fi
 ])
 
 
 
 dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
Put CURLDEBUG and DEBUGBUILD in lib/curl_config.h.
They are removed from the compiler flags.

This ensures that make dependency tracking will force a rebuild whenever
configure --enable-debug or --enable-curldebug changes.
@gevaerts

This comment has been minimized.

Show comment
Hide comment
@gevaerts

gevaerts May 4, 2018

Contributor

OK, I've added that to the commit.

Contributor

gevaerts commented May 4, 2018

OK, I've added that to the commit.

@bagder bagder closed this in 7663a7c May 4, 2018

@gevaerts gevaerts deleted the gevaerts:debug-in-config branch May 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment