[gimp] app: Clean up subsystem linking dependencies
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: Clean up subsystem linking dependencies
- Date: Sat, 5 Sep 2009 12:32:05 +0000 (UTC)
commit 871e41c06230a5dd3cd2db86faac8e677eac35b0
Author: Martin Nordholts <martinn src gnome org>
Date: Sat Sep 5 14:32:32 2009 +0200
app: Clean up subsystem linking dependencies
Clean up subsystem linking dependencies by
* Rearranging LDADD entries to better match architectural layers
* Being clear about why we need to pass -u in LDFLAGS some times
* Adding FIXMEs when we have broken dependencies
* Introducing a helper variable so we can share LDADD between
gimp-console and gimp
app/Makefile.am | 172 ++++++++++++++++++++++++------------------------
app/config/Makefile.am | 24 ++++---
2 files changed, 102 insertions(+), 94 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index c9b7dd9..6e606ce 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -9,28 +9,28 @@ libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSIO
libgimpthumb = $(top_builddir)/libgimpthumb/libgimpthumb-$(GIMP_API_VERSION).la
+# Sort this by architectural depenendencies
SUBDIRS = \
- paint-funcs \
+ gui \
+ menus \
+ actions \
+ dialogs \
+ tools \
+ display \
+ widgets \
+ pdb \
+ file \
+ plug-in \
+ core \
+ xcf \
+ vectors \
+ text \
composite \
- base \
gegl \
- config \
- core \
paint \
- text \
- vectors \
- plug-in \
- file \
- xcf \
- pdb \
- widgets \
- display \
- tools \
- dialogs \
- actions \
- menus \
- gui
-
+ config \
+ paint-funcs \
+ base
if ENABLE_GIMP_CONSOLE
bin_PROGRAMS = gimp-2.7 gimp-console-2.7
@@ -94,56 +94,90 @@ INCLUDES = \
$(GEGL_CFLAGS) \
-I$(includedir)
-AM_LDFLAGS = \
- $(munix) \
- $(CARBON_LDFLAGS) \
- -u $(SYMPREFIX)xcf_init \
+# FIXME: core should not depend on xcf
+workaround_that_core_depends_on_xcf = \
+ -u $(SYMPREFIX)xcf_init
+
+# FIXME: core should not depend on pdb
+workaround_that_core_depends_on_pdb = \
-u $(SYMPREFIX)internal_procs_init \
- -u $(SYMPREFIX)gimp_coords_interpolate_bezier \
- -u $(SYMPREFIX)gimp_curve_map_pixels \
- -u $(SYMPREFIX)gimp_image_map_config_get_type \
-u $(SYMPREFIX)gimp_plug_in_manager_restore
-gimp_2_7_LDFLAGS = $(AM_LDFLAGS) $(win32_ldflags)
+# FIXME: plug-in should not depend on pdb
+workaround_that_plug_in_depends_on_pdb = \
+ -u $(SYMPREFIX)gimp_pdb_compat_param_spec
-gimp_2_7_LDADD = \
- gui/libappgui.a \
- actions/libappactions.a \
- dialogs/libappdialogs.a \
- menus/libappmenus.a \
- display/libappdisplay.a \
- tools/libapptools.a \
- widgets/libappwidgets.a \
- pdb/libappinternal-procs.a \
+# FIXME: file should not depend on plug-in
+workaround_that_file_depends_on_plug_in = \
+ -u $(SYMPREFIX)plug_in_icc_profile_apply_rgb \
+ -u $(SYMPREFIX)gimp_image_map_config_get_type
+
+# core, vectors and gegl are on the same architectural layer, prevent
+# the linker from panicing
+calm_down_linker = \
+ -u $(SYMPREFIX)gimp_vectors_undo_get_type \
+ -u $(SYMPREFIX)gimp_vectors_mod_undo_get_type \
+ -u $(SYMPREFIX)gimp_vectors_prop_undo_get_type \
+ -u $(SYMPREFIX)gimp_curve_map_pixels
+
+AM_LDFLAGS = \
+ $(munix) \
+ $(CARBON_LDFLAGS) \
+ $(calm_down_linker) \
+ $(workaround_that_core_depends_on_xcf) \
+ $(workaround_that_core_depends_on_pdb) \
+ $(workaround_that_plug_in_depends_on_pdb) \
+ $(workaround_that_file_depends_on_plug_in)
+
+gimpconsoleldadd = \
+ display/gimpdisplayoptions.o \
+ display/display-enums.o \
+ widgets/widgets-enums.o \
xcf/libappxcf.a \
- file/libappfile.a \
- plug-in/libappplug-in.a \
+ pdb/libappinternal-procs.a \
pdb/libapppdb.a \
- core/libappcore.a \
+ plug-in/libappplug-in.a \
vectors/libappvectors.a \
- paint/libapppaint.a \
+ core/libappcore.a \
+ file/libappfile.a \
text/libapptext.a \
- config/libappconfig.a \
+ paint/libapppaint.a \
+ composite/libappcomposite.a \
gegl/libappgegl.a \
+ config/libappconfig.a \
paint-funcs/libapppaint-funcs.a \
- composite/libappcomposite.a \
base/libappbase.a \
- $(libgimpwidgets) \
- $(libgimpmodule) \
- $(libgimpcolor) \
- $(libgimpthumb) \
- $(libgimpmath) \
$(libgimpconfig) \
+ $(libgimpmath) \
+ $(libgimpthumb) \
+ $(libgimpcolor) \
+ $(libgimpmodule) \
$(libgimpbase) \
- $(GTK_LIBS) \
- $(PANGOCAIRO_LIBS) \
- $(FONTCONFIG_LIBS) \
+ $(GIMPICONRC) \
+ $(GDK_PIXBUF_LIBS) \
$(FREETYPE_LIBS) \
- $(DBUS_GLIB_LIBS) \
+ $(FONTCONFIG_LIBS) \
+ $(PANGOCAIRO_LIBS) \
+ $(CAIRO_LIBS) \
$(GEGL_LIBS) \
- $(RT_LIBS) \
+ $(GLIB_LIBS) \
$(INTLLIBS) \
- $(GIMPICONRC)
+ $(RT_LIBS)
+
+gimp_2_7_LDFLAGS = $(AM_LDFLAGS) $(win32_ldflags)
+
+gimp_2_7_LDADD = \
+ gui/libappgui.a \
+ menus/libappmenus.a \
+ actions/libappactions.a \
+ dialogs/libappdialogs.a \
+ tools/libapptools.a \
+ display/libappdisplay.a \
+ widgets/libappwidgets.a \
+ $(libgimpwidgets) \
+ $(GTK_LIBS) \
+ $(DBUS_GLIB_LIBS) \
+ $(gimpconsoleldadd)
if ENABLE_GIMP_CONSOLE
@@ -155,39 +189,7 @@ gimp_console_2_7_CPPFLAGS = \
-DGIMP_CONSOLE_COMPILATION
gimp_console_2_7_LDADD = \
- widgets/widgets-enums.o \
- display/display-enums.o \
- display/gimpdisplayoptions.o \
- pdb/libappinternal-procs.a \
- xcf/libappxcf.a \
- file/libappfile.a \
- plug-in/libappplug-in.a \
- pdb/libapppdb.a \
- core/libappcore.a \
- vectors/libappvectors.a \
- paint/libapppaint.a \
- text/libapptext.a \
- config/libappconfig.a \
- gegl/libappgegl.a \
- paint-funcs/libapppaint-funcs.a \
- composite/libappcomposite.a \
- base/libappbase.a \
- $(libgimpmodule) \
- $(libgimpcolor) \
- $(libgimpthumb) \
- $(libgimpmath) \
- $(libgimpconfig) \
- $(libgimpbase) \
- $(GDK_PIXBUF_LIBS) \
- $(CAIRO_LIBS) \
- $(PANGOCAIRO_LIBS) \
- $(FONTCONFIG_LIBS) \
- $(FREETYPE_LIBS) \
- $(GEGL_LIBS) \
- $(GLIB_LIBS) \
- $(RT_LIBS) \
- $(INTLLIBS) \
- $(GIMPICONRC)
+ $(gimpconsoleldadd)
endif
diff --git a/app/config/Makefile.am b/app/config/Makefile.am
index 3246bf5..c3ad7c5 100644
--- a/app/config/Makefile.am
+++ b/app/config/Makefile.am
@@ -63,30 +63,36 @@ TESTS = test-config
test_config_DEPENDENCIES = $(gimpconfig_libs)
+# We need this due to circular dependencies, see more detailed
+# comments about it in app/Makefile.am
test_config_LDFLAGS = \
-u $(SYMPREFIX)xcf_init \
+ -u $(SYMPREFIX)gimp_pdb_new \
-u $(SYMPREFIX)internal_procs_init \
- -u $(SYMPREFIX)gimp_coords_interpolate_bezier \
-u $(SYMPREFIX)gimp_plug_in_manager_restore \
+ -u $(SYMPREFIX)plug_in_icc_profile_apply_rgb \
+ -u $(SYMPREFIX)gimp_vectors_undo_get_type \
+ -u $(SYMPREFIX)gimp_vectors_mod_undo_get_type \
+ -u $(SYMPREFIX)gimp_vectors_prop_undo_get_type \
-u $(SYMPREFIX)gimp_image_map_config_get_type
test_config_LDADD = \
- ../widgets/widgets-enums.o \
- ../display/display-enums.o \
../display/gimpdisplayoptions.o \
- ../pdb/libappinternal-procs.a \
+ ../display/display-enums.o \
+ ../widgets/widgets-enums.o \
../xcf/libappxcf.a \
- ../file/libappfile.a \
- ../plug-in/libappplug-in.a \
+ ../pdb/libappinternal-procs.a \
../pdb/libapppdb.a \
- ../core/libappcore.a \
+ ../plug-in/libappplug-in.a \
../vectors/libappvectors.a \
- ../paint/libapppaint.a \
+ ../core/libappcore.a \
+ ../file/libappfile.a \
../text/libapptext.a \
+ ../paint/libapppaint.a \
+ ../composite/libappcomposite.a \
../gegl/libappgegl.a \
libappconfig.a \
../paint-funcs/libapppaint-funcs.a \
- ../composite/libappcomposite.a \
../base/libappbase.a \
../gimp-log.o \
$(libgimpmodule) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]