From 1f504141b74b2590996fe2bcdb33d3fb133e0c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9ron?= Date: Tue, 19 Oct 2004 23:06:11 +0000 Subject: [PATCH] Use a new DLLDEFS variable in configure/Makefiles to actually remove all the debug messages (minus ERRs) if the user decides so. --- configure | 18 +++++++----------- configure.ac | 6 ++++-- dlls/Makedll.rules.in | 3 ++- dlls/Maketest.rules.in | 3 ++- dlls/dxerr8/Makefile.in | 3 ++- dlls/dxerr9/Makefile.in | 3 ++- dlls/dxguid/Makefile.in | 3 ++- dlls/strmiids/Makefile.in | 3 ++- dlls/uuid/Makefile.in | 3 ++- include/config.h.in | 6 ------ include/wine/debug.h | 12 ++++++------ programs/Makeprog.rules.in | 3 ++- programs/avitools/Makefile.in | 3 ++- 13 files changed, 35 insertions(+), 34 deletions(-) diff --git a/configure b/configure index f76a9c89fcc..c8648d4b255 100755 --- a/configure +++ b/configure @@ -311,7 +311,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS WIN16_FILES WIN16_INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS DB2HTML DB2PDF DB2PS DB2TXT FONTFORGE LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS ft_devel ft_devel2 FREETYPELIBS FREETYPEINCL FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS CAPI4LINUXLIBS EXTRACFLAGS DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS WINE_BINARIES MAIN_BINARY LDD ALLOCA LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS WIN16_FILES WIN16_INSTALL DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS DB2HTML DB2PDF DB2PS DB2TXT FONTFORGE LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS ft_devel ft_devel2 FREETYPELIBS FREETYPEINCL FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS CAPI4LINUXLIBS EXTRACFLAGS DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS WINE_BINARIES MAIN_BINARY LDD ALLOCA LIBOBJS LTLIBOBJS' ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES' # Initialize some variables set by options. @@ -1413,21 +1413,16 @@ then WIN16_FILES="" WIN16_INSTALL="" fi + +DLLDEFS="" + if test "x$enable_debug" = "xno" then - -cat >>confdefs.h <<\_ACEOF -#define NO_DEBUG_MSGS 1 -_ACEOF - + DLLDEFS="$DLLDEFS -DWINE_NO_DEBUG_MSGS" fi if test "x$enable_trace" = "xno" -o "x$enable_debug" = "xno" then - -cat >>confdefs.h <<\_ACEOF -#define NO_TRACE_MSGS 1 -_ACEOF - + DLLDEFS="$DLLDEFS -DWINE_NO_TRACE_MSGS" fi @@ -21037,6 +21032,7 @@ s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@WIN16_FILES@,$WIN16_FILES,;t t s,@WIN16_INSTALL@,$WIN16_INSTALL,;t t +s,@DLLDEFS@,$DLLDEFS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t diff --git a/configure.ac b/configure.ac index 9705e28869e..5e958101d82 100644 --- a/configure.ac +++ b/configure.ac @@ -28,13 +28,15 @@ then WIN16_FILES="" WIN16_INSTALL="" fi + +AC_SUBST(DLLDEFS,"") if test "x$enable_debug" = "xno" then - AC_DEFINE(NO_DEBUG_MSGS,1,[Define to disable all debug messages.]) + DLLDEFS="$DLLDEFS -DWINE_NO_DEBUG_MSGS" fi if test "x$enable_trace" = "xno" -o "x$enable_debug" = "xno" then - AC_DEFINE(NO_TRACE_MSGS,1,[Define to disable trace messages.]) + DLLDEFS="$DLLDEFS -DWINE_NO_TRACE_MSGS" fi dnl **** Check for some programs **** diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index 8cc94f03d85..f9605626905 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -9,9 +9,10 @@ # plus all variables required by the global Make.rules.in # -DEFS = -D__WINESRC__ $(EXTRADEFS) +DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ DLLEXT = @DLLEXT@ +DEFS = -D__WINESRC__ $(DLLDEFS) $(EXTRADEFS) MAINSPEC = $(MODULE:%.dll=%).spec SPEC_DEF = $(MAINSPEC).def WIN16_FILES = $(SPEC_SRCS16:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16) diff --git a/dlls/Maketest.rules.in b/dlls/Maketest.rules.in index 8a9c46c9f47..b76216be0b5 100644 --- a/dlls/Maketest.rules.in +++ b/dlls/Maketest.rules.in @@ -9,8 +9,9 @@ # plus all variables required by the global Make.rules.in # -DEFS = $(EXTRADEFS) +DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ +DEFS = $(DLLDEFS) $(EXTRADEFS) MODULE = $(TESTDLL:%.dll=%)_test.exe TESTLIST = testlist.c diff --git a/dlls/dxerr8/Makefile.in b/dlls/dxerr8/Makefile.in index 8a120344e7f..f6141be45c7 100644 --- a/dlls/dxerr8/Makefile.in +++ b/dlls/dxerr8/Makefile.in @@ -1,5 +1,6 @@ -DEFS = -D__WINESRC__ +DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ +DEFS = -D__WINESRC__ $(DLLDEFS) TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ diff --git a/dlls/dxerr9/Makefile.in b/dlls/dxerr9/Makefile.in index 16771c934e5..b4481c19f81 100644 --- a/dlls/dxerr9/Makefile.in +++ b/dlls/dxerr9/Makefile.in @@ -1,5 +1,6 @@ -DEFS = -D__WINESRC__ +DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ +DEFS = -D__WINESRC__ $(DLLDEFS) TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ diff --git a/dlls/dxguid/Makefile.in b/dlls/dxguid/Makefile.in index 0c4e6776f6c..3ddcdbf7058 100644 --- a/dlls/dxguid/Makefile.in +++ b/dlls/dxguid/Makefile.in @@ -1,5 +1,6 @@ -DEFS = -D__WINESRC__ +DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ +DEFS = -D__WINESRC__ $(DLLDEFS) TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ diff --git a/dlls/strmiids/Makefile.in b/dlls/strmiids/Makefile.in index d6667e18753..a57fee18e68 100644 --- a/dlls/strmiids/Makefile.in +++ b/dlls/strmiids/Makefile.in @@ -1,5 +1,6 @@ -DEFS = -D__WINESRC__ +DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ +DEFS = -D__WINESRC__ $(DLLDEFS) TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ diff --git a/dlls/uuid/Makefile.in b/dlls/uuid/Makefile.in index 13ce52e24ca..48f72918cd6 100644 --- a/dlls/uuid/Makefile.in +++ b/dlls/uuid/Makefile.in @@ -1,5 +1,6 @@ -DEFS = -D__WINESRC__ +DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ +DEFS = -D__WINESRC__ $(DLLDEFS) TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ diff --git a/include/config.h.in b/include/config.h.in index 0997143e0d7..2ac53c42bb2 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -860,12 +860,6 @@ /* Define if we have __va_copy */ #undef HAVE___VA_COPY -/* Define to disable all debug messages. */ -#undef NO_DEBUG_MSGS - -/* Define to disable trace messages. */ -#undef NO_TRACE_MSGS - /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT diff --git a/include/wine/debug.h b/include/wine/debug.h index e00bedca6cf..b794d732b67 100644 --- a/include/wine/debug.h +++ b/include/wine/debug.h @@ -45,13 +45,13 @@ enum __WINE_DEBUG_CLASS { __WINE_DBCL_COUNT }; -#ifndef NO_TRACE_MSGS +#ifndef WINE_NO_TRACE_MSGS # define __WINE_GET_DEBUGGING_TRACE(dbch) ((dbch)[0] & (1 << __WINE_DBCL_TRACE)) #else # define __WINE_GET_DEBUGGING_TRACE(dbch) 0 #endif -#ifndef NO_DEBUG_MSGS +#ifndef WINE_NO_DEBUG_MSGS # define __WINE_GET_DEBUGGING_WARN(dbch) ((dbch)[0] & (1 << __WINE_DBCL_WARN)) # define __WINE_GET_DEBUGGING_FIXME(dbch) ((dbch)[0] & (1 << __WINE_DBCL_FIXME)) #else @@ -80,12 +80,12 @@ enum __WINE_DEBUG_CLASS { #define __WINE_PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args))) -#ifdef NO_TRACE_MSGS +#ifdef WINE_NO_TRACE_MSGS #define WINE_TRACE(args...) do { } while(0) #define WINE_TRACE_(ch) WINE_TRACE #endif -#ifdef NO_DEBUG_MSGS +#ifdef WINE_NO_DEBUG_MSGS #define WINE_WARN(args...) do { } while(0) #define WINE_WARN_(ch) WINE_WARN #define WINE_FIXME(args...) do { } while(0) @@ -105,12 +105,12 @@ enum __WINE_DEBUG_CLASS { #define __WINE_PRINTF_ATTR(fmt,args) -#ifdef NO_TRACE_MSGS +#ifdef WINE_NO_TRACE_MSGS #define WINE_TRACE(...) do { } while(0) #define WINE_TRACE_(ch) WINE_TRACE #endif -#ifdef NO_DEBUG_MSGS +#ifdef WINE_NO_DEBUG_MSGS #define WINE_WARN(...) do { } while(0) #define WINE_WARN_(ch) WINE_WARN #define WINE_FIXME(...) do { } while(0) diff --git a/programs/Makeprog.rules.in b/programs/Makeprog.rules.in index 6e56271f5a6..1b8f906ec55 100644 --- a/programs/Makeprog.rules.in +++ b/programs/Makeprog.rules.in @@ -9,8 +9,9 @@ # plus all variables required by the global Make.rules.in # -DEFS = $(EXTRADEFS) +DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ +DEFS = $(DLLDEFS) $(EXTRADEFS) ALL_OBJS = $(OBJS) $(MODULE).dbg.o ALL_LIBS = $(IMPORTS:%=-l%) $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS) BASEMODULE = $(MODULE:.exe=) diff --git a/programs/avitools/Makefile.in b/programs/avitools/Makefile.in index 14279346e08..9d174e5a628 100644 --- a/programs/avitools/Makefile.in +++ b/programs/avitools/Makefile.in @@ -1,5 +1,6 @@ -DEFS = $(EXTRADEFS) +DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ +DEFS = $(DLLDEFS) $(EXTRADEFS) TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@