Fix visibility for glib/ and gio/ submodules

We have various sub directories in glib/ and gio/ (eg: inotify, gnulib,
pcre, xdgmime, etc.) that build convenience libraries that are then
included into libglib and libgio.  The files in these directories need
to be built with the same visibility policy as the files in the first
level directories, so add CFLAGS for them all.

This wasn't a problem when the visibility flags were set directly in
CFLAGS but then we had to deal with some modules that we built that we
explicitly wanted to export symbols from.

For now, we can keep things the way they are because it's less hacky and
although it's a theoretical hazard to forget these CFLAGS, we rarely add
new subdirectories to the build.
This commit is contained in:
Ryan Lortie 2013-01-18 13:23:40 -05:00
parent 6f8f1f7097
commit 346aa683de
8 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,7 @@ libfen_la_SOURCES = \
$(NULL) $(NULL)
libfen_la_CFLAGS = \ libfen_la_CFLAGS = \
$(GLIB_HIDDEN_VISIBILITY_CFLAGS) \
-DG_LOG_DOMAIN=\"GLib-GIO\" \ -DG_LOG_DOMAIN=\"GLib-GIO\" \
$(gio_INCLUDES) \ $(gio_INCLUDES) \
$(GLIB_DEBUG_FLAGS) \ $(GLIB_DEBUG_FLAGS) \

View File

@ -22,6 +22,7 @@ libinotify_la_SOURCES = \
$(NULL) $(NULL)
libinotify_la_CFLAGS = \ libinotify_la_CFLAGS = \
$(GLIB_HIDDEN_VISIBILITY_CFLAGS) \
-DG_LOG_DOMAIN=\"GLib-GIO\" \ -DG_LOG_DOMAIN=\"GLib-GIO\" \
$(gio_INCLUDES) \ $(gio_INCLUDES) \
$(GLIB_DEBUG_FLAGS) \ $(GLIB_DEBUG_FLAGS) \

View File

@ -26,6 +26,7 @@ libkqueue_la_SOURCES = \
$(NULL) $(NULL)
libkqueue_la_CFLAGS = \ libkqueue_la_CFLAGS = \
$(GLIB_HIDDEN_VISIBILITY_CFLAGS) \
-DG_LOG_DOMAIN=\"GLib-GIO\" \ -DG_LOG_DOMAIN=\"GLib-GIO\" \
$(gio_INCLUDES) \ $(gio_INCLUDES) \
$(GLIB_DEBUG_FLAGS) \ $(GLIB_DEBUG_FLAGS) \

View File

@ -19,6 +19,7 @@ libgiowin32_la_SOURCES = \
$(NULL) $(NULL)
libgiowin32_la_CFLAGS = \ libgiowin32_la_CFLAGS = \
$(GLIB_HIDDEN_VISIBILITY_CFLAGS) \
-DG_LOG_DOMAIN=\"GLib-GIO\" \ -DG_LOG_DOMAIN=\"GLib-GIO\" \
$(gio_INCLUDES) \ $(gio_INCLUDES) \
$(GLIB_DEBUG_FLAGS) \ $(GLIB_DEBUG_FLAGS) \

View File

@ -4,6 +4,7 @@ AM_CPPFLAGS = -DXDG_PREFIX=_gio_xdg
noinst_LTLIBRARIES = libxdgmime.la noinst_LTLIBRARIES = libxdgmime.la
libxdgmime_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
libxdgmime_la_SOURCES = \ libxdgmime_la_SOURCES = \
xdgmime.c \ xdgmime.c \
xdgmime.h \ xdgmime.h \

View File

@ -6,6 +6,7 @@ INCLUDES = $(glib_INCLUDES) -DG_LOG_DOMAIN=\"GLib\" \
noinst_LTLIBRARIES = libgnulib.la noinst_LTLIBRARIES = libgnulib.la
libgnulib_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
libgnulib_la_SOURCES = \ libgnulib_la_SOURCES = \
asnprintf.c \ asnprintf.c \
printf-args.c \ printf-args.c \

View File

@ -6,6 +6,7 @@ INCLUDES = \
noinst_LTLIBRARIES = libcharset.la noinst_LTLIBRARIES = libcharset.la
libcharset_la_CFLAGS = $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
libcharset_la_SOURCES = \ libcharset_la_SOURCES = \
libcharset.h \ libcharset.h \
localcharset.h \ localcharset.h \

View File

@ -25,6 +25,7 @@ libpcre_la_CPPFLAGS = \
$(AM_CPPFLAGS) $(AM_CPPFLAGS)
libpcre_la_CFLAGS = \ libpcre_la_CFLAGS = \
$(GLIB_HIDDEN_VISIBILITY_CFLAGS) \
$(PCRE_WARN_CFLAGS) \ $(PCRE_WARN_CFLAGS) \
$(DEP_CFLAGS) \ $(DEP_CFLAGS) \
$(AM_CFLAGS) $(AM_CFLAGS)