[tepl] build: tests: link Amtk after Tepl
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tepl] build: tests: link Amtk after Tepl
- Date: Sat, 25 Nov 2017 10:06:23 +0000 (UTC)
commit 66803d1af7ce5314cfc68c95d7b7b4c808cd6414
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Nov 25 10:33:52 2017 +0100
build: tests: link Amtk after Tepl
This will be needed for a later commit for the close confirmation
dialog. There was a linker error about undefined amtk symbols when
linking some of the gui tests and unit tests (but not all). This was
caused by a cyclic dependency between several *.o files inside Tepl
(tepl-close-confirm-dialog-single.c calls tepl_application_window
functions, and tepl-application-window.c indirectly depends on
tepl-close-confirm-dialog-single.c, via tepl-tab.c; this is a bit of a
violation of layer, but it is just to add the dialog to the
GtkWindowGroup).
It is anyway a good practice to link the archives in the good order
(I've learned something new about Unix linkers!).
tests/Makefile.am | 7 +++++--
testsuite/Makefile.am | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1801db8..625a20d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -6,8 +6,11 @@ AM_CPPFLAGS = \
AM_LDFLAGS = $(WARN_LDFLAGS)
-LDADD = $(top_builddir)/amtk/libamtk-core.la \
- $(top_builddir)/tepl/libtepl-core.la \
+# The order is important here: link Amtk after Tepl, since Tepl uses Amtk.
+# This is how Unix linkers work by default, see for example the documentation
+# of the --library option in the ld manpage.
+LDADD = $(top_builddir)/tepl/libtepl-core.la \
+ $(top_builddir)/amtk/libamtk-core.la \
$(AMTK_DEP_LIBS) \
$(TEPL_DEP_LIBS)
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index d003894..f1eda97 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -18,8 +18,11 @@ AM_CPPFLAGS = \
AM_LDFLAGS = $(WARN_LDFLAGS)
-LDADD = $(top_builddir)/amtk/libamtk-core.la \
- $(top_builddir)/tepl/libtepl-core.la \
+# The order is important here: link Amtk after Tepl, since Tepl uses Amtk.
+# This is how Unix linkers work by default, see for example the documentation
+# of the --library option in the ld manpage.
+LDADD = $(top_builddir)/tepl/libtepl-core.la \
+ $(top_builddir)/amtk/libamtk-core.la \
$(AMTK_DEP_LIBS) \
$(TEPL_DEP_LIBS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]