From be5d891f0e413498f1c6715af50885c1877fb571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Tue, 25 May 2010 19:49:49 +0000 Subject: [PATCH] Pass G_LOG_DOMAIN to source files for better logging. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4954 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 9 ++++++++- plugins/Makefile.am | 9 ++++++++- src/Makefile.am | 6 ++++-- tagmanager/Makefile.am | 5 ++--- wscript | 3 +++ 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4dd12d30..e4ad0f52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,15 @@ +2010-05-25 Enrico Tröger + + * plugins/Makefile.am, src/Makefile.am, tagmanager/Makefile.am, + wscript: + Pass G_LOG_DOMAIN to source files for better logging. + + 2010-05-24 Frank Lanitz * THANKS, src/about.c: Update of translation credits to reflect a change on Spanish - translation team better. + translation team better. 2010-05-23 Lex Trotman diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 095f1f84..9c5b4883 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -84,7 +84,14 @@ saveactions_la_SOURCES = saveactions.c filebrowser_la_SOURCES = filebrowser.c splitwindow_la_SOURCES = splitwindow.c -# instead of linking against all in $(GTK_LIBS), we link only against needed libs +demoplugin_la_CFLAGS = -DG_LOG_DOMAIN=\""Demoplugin"\" +classbuilder_la_CFLAGS = -DG_LOG_DOMAIN=\""Classbuilder"\" +htmlchars_la_CFLAGS = -DG_LOG_DOMAIN=\""HTMLChars"\" +export_la_CFLAGS = -DG_LOG_DOMAIN=\""Export"\" +saveactions_la_CFLAGS = -DG_LOG_DOMAIN=\""SaveActions"\" +filebrowser_la_CFLAGS = -DG_LOG_DOMAIN=\""FileBrowser"\" +splitwindow_la_CFLAGS = -DG_LOG_DOMAIN=\""SplitWindow"\" + demoplugin_la_LIBADD = $(GTK_LIBS) classbuilder_la_LIBADD = $(GTK_LIBS) htmlchars_la_LIBADD = $(GTK_LIBS) diff --git a/src/Makefile.am b/src/Makefile.am index 9ed3ca56..95a6ab4f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -95,7 +95,8 @@ AM_CFLAGS = -DGEANY_DATADIR=\"data\" \ -DGEANY_LOCALEDIR=\"\" \ -DGEANY_PREFIX=\"\" \ -DGEANY_PRIVATE \ - -DGTK + -DGTK \ + -DG_LOG_DOMAIN=\""Geany"\" geany_LDFLAGS = -mwindows -mms-bitfields @@ -120,7 +121,8 @@ AM_CFLAGS = -DGEANY_DATADIR=\""$(datadir)"\" \ -DGEANY_LOCALEDIR=\""$(localedir)"\" \ -DGEANY_PREFIX=\""$(prefix)"\" \ -DGEANY_PRIVATE \ - -DGTK + -DGTK \ + -DG_LOG_DOMAIN=\""Geany"\" clean-local: diff --git a/tagmanager/Makefile.am b/tagmanager/Makefile.am index 328cec4d..dd6ac89f 100644 --- a/tagmanager/Makefile.am +++ b/tagmanager/Makefile.am @@ -3,9 +3,8 @@ SUBDIRS = include INCLUDES = -I$(srcdir)/include $(GTK_CFLAGS) -# -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED \ -# -DGDK_PIXBUF_DEPRECATED \ -# -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED + +AM_CFLAGS = -DG_LOG_DOMAIN=\""Tagmanager"\" # regex.c is the GNU regex implementation needed for Windows EXTRA_DIST = regex.c diff --git a/wscript b/wscript index 68f9ceb2..88d16bf4 100644 --- a/wscript +++ b/wscript @@ -340,6 +340,7 @@ def build(bld): features = 'cc cshlib', source = 'plugins/' + plugin_name + '.c', includes = '. plugins/ src/ scintilla/include tagmanager/include', + defines = 'G_LOG_DOMAIN="%s"' % plugin_name, target = plugin_name, uselib = 'GTK', install_path = instpath @@ -355,6 +356,7 @@ def build(bld): name = 'tagmanager', target = 'tagmanager', includes = '. tagmanager/ tagmanager/include/', + defines = 'G_LOG_DOMAIN="Tagmanager"', uselib = 'GTK', install_path = None # do not install this library ) @@ -382,6 +384,7 @@ def build(bld): target = 'geany', source = geany_sources, includes = '. src/ scintilla/include/ tagmanager/include/', + defines = 'G_LOG_DOMAIN="Geany"', uselib = 'GTK GIO WIN32', uselib_local = 'scintilla tagmanager', add_objects = 'geany-rc' if is_win32 else None