[tepl] amtk: separate deps for Amtk to not depend on GtkSourceView etc



commit 5d29428badc795fa7dc4e93902bd57b10bf12580
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jul 15 14:22:28 2017 +0200

    amtk: separate deps for Amtk to not depend on GtkSourceView etc

 amtk.pc.in                 |    4 ++--
 amtk/Makefile.am           |    6 +++---
 configure.ac               |   14 ++++++++++++--
 docs/reference/Makefile.am |    5 +++--
 tepl.pc.in                 |    4 ++--
 tepl/Makefile.am           |    6 +++---
 tests/Makefile.am          |   10 ++++++----
 testsuite/Makefile.am      |   10 ++++++----
 8 files changed, 37 insertions(+), 22 deletions(-)
---
diff --git a/amtk.pc.in b/amtk.pc.in
index 17071b8..b47b4dd 100644
--- a/amtk.pc.in
+++ b/amtk.pc.in
@@ -6,7 +6,7 @@ includedir=@includedir@
 Name: Amtk
 Description: Actions, Menus and Toolbars Kit
 Version: @PACKAGE_VERSION@
-Requires: @AX_PACKAGE_REQUIRES@
-Requires.private: @AX_PACKAGE_REQUIRES_PRIVATE@
+Requires: @AMTK_PACKAGE_REQUIRES@
+Requires.private: @AMTK_PACKAGE_REQUIRES_PRIVATE@
 Libs: -L${libdir} -lamtk-@TEPL_API_VERSION@
 Cflags: -I${includedir}/amtk-@TEPL_API_VERSION@
diff --git a/amtk/Makefile.am b/amtk/Makefile.am
index 74a09ed..6172b1a 100644
--- a/amtk/Makefile.am
+++ b/amtk/Makefile.am
@@ -7,7 +7,7 @@ AM_CPPFLAGS =                           \
        -I$(top_srcdir)                 \
        $(WARN_CFLAGS)                  \
        $(CODE_COVERAGE_CPPFLAGS)       \
-       $(DEP_CFLAGS)
+       $(AMTK_DEP_CFLAGS)
 
 amtk_public_headers =                          \
        amtk.h                                  \
@@ -56,7 +56,7 @@ libamtk_@TEPL_API_VERSION@_la_SOURCES =
 
 libamtk_@TEPL_API_VERSION@_la_LIBADD = \
        libamtk-core.la                 \
-       $(DEP_LIBS)
+       $(AMTK_DEP_LIBS)
 
 libamtk_@TEPL_API_VERSION@_la_LDFLAGS =                \
        -version-info $(TEPL_LT_VERSION)        \
@@ -85,7 +85,7 @@ INTROSPECTION_SCANNER_ARGS =          \
 
 Amtk_@TEPL_API_VERSION@_gir_NAMESPACE = Amtk
 Amtk_@TEPL_API_VERSION@_gir_VERSION = @TEPL_API_VERSION@
-Amtk_@TEPL_API_VERSION@_gir_CFLAGS = $(DEP_CFLAGS)
+Amtk_@TEPL_API_VERSION@_gir_CFLAGS = $(AMTK_DEP_CFLAGS)
 Amtk_@TEPL_API_VERSION@_gir_SCANNERFLAGS = $(WARN_SCANNERFLAGS)
 Amtk_@TEPL_API_VERSION@_gir_LIBS = libamtk-@TEPL_API_VERSION@.la
 Amtk_@TEPL_API_VERSION@_gir_FILES =    \
diff --git a/configure.ac b/configure.ac
index aefcf91..0d44862 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,9 +86,19 @@ AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS], [yes])
 
 # Dynamic linking dependencies
 AX_REQUIRE_DEFINED([AX_PKG_CHECK_MODULES])
-AX_PKG_CHECK_MODULES([DEP],
+AX_PKG_CHECK_MODULES([AMTK_DEP],
+                    [glib-2.0 >= $glib_req  gtk+-3.0 >= $gtk_req],
+                    [],
+                    [], [],
+                    [AMTK_PACKAGE_REQUIRES],
+                    [AMTK_PACKAGE_REQUIRES_PRIVATE])
+
+AX_PKG_CHECK_MODULES([TEPL_DEP],
                     [glib-2.0 >= $glib_req  gtk+-3.0 >= $gtk_req  gtksourceview-3.0 >= $gtksourceview_req],
-                    [libxml-2.0 >= $libxml_req  uchardet])
+                    [libxml-2.0 >= $libxml_req  uchardet],
+                    [], [],
+                    [TEPL_PACKAGE_REQUIRES],
+                    [TEPL_PACKAGE_REQUIRES_PRIVATE])
 
 # Use GVfs metadata or the old XML file store.
 AC_ARG_ENABLE([gvfs-metadata],
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 13463e2..5ca51ba 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -51,11 +51,12 @@ FIXXREF_OPTIONS =
 # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
 # Only needed if you are using gtkdoc-scangobj to dynamically query widget
 # signals and properties.
-GTKDOC_CFLAGS = -I$(top_srcdir) $(DEP_CFLAGS)
+GTKDOC_CFLAGS = -I$(top_srcdir) $(AMTK_DEP_CFLAGS) $(TEPL_DEP_CFLAGS)
 GTKDOC_LIBS =                                                  \
        $(top_builddir)/amtk/libamtk-@TEPL_API_VERSION@.la      \
        $(top_builddir)/tepl/libtepl-@TEPL_API_VERSION@.la      \
-       $(DEP_LIBS)
+       $(AMTK_DEP_LIBS)                                        \
+       $(TEPL_DEP_LIBS)
 
 MAINTAINERCLEANFILES =                 \
        $(DOC_MODULE)-overrides.txt     \
diff --git a/tepl.pc.in b/tepl.pc.in
index 144cfd6..d62157b 100644
--- a/tepl.pc.in
+++ b/tepl.pc.in
@@ -6,7 +6,7 @@ includedir=@includedir@
 Name: @PACKAGE_NAME@
 Description: Text editor product line
 Version: @PACKAGE_VERSION@
-Requires: @AX_PACKAGE_REQUIRES@  amtk-@TEPL_API_VERSION@ >= @PACKAGE_VERSION@
-Requires.private: @AX_PACKAGE_REQUIRES_PRIVATE@
+Requires: @TEPL_PACKAGE_REQUIRES@  amtk-@TEPL_API_VERSION@ >= @PACKAGE_VERSION@
+Requires.private: @TEPL_PACKAGE_REQUIRES_PRIVATE@
 Libs: -L${libdir} -ltepl-@TEPL_API_VERSION@
 Cflags: -I${includedir}/tepl-@TEPL_API_VERSION@
diff --git a/tepl/Makefile.am b/tepl/Makefile.am
index 7641bc0..ed1a2dd 100644
--- a/tepl/Makefile.am
+++ b/tepl/Makefile.am
@@ -8,7 +8,7 @@ AM_CPPFLAGS =                           \
        -I$(top_srcdir)                 \
        $(WARN_CFLAGS)                  \
        $(CODE_COVERAGE_CPPFLAGS)       \
-       $(DEP_CFLAGS)
+       $(TEPL_DEP_CFLAGS)
 
 tepl_public_headers =                          \
        tepl.h                                  \
@@ -113,7 +113,7 @@ libtepl_@TEPL_API_VERSION@_la_SOURCES =
 libtepl_@TEPL_API_VERSION@_la_LIBADD =                         \
        libtepl-core.la                                         \
        $(top_builddir)/amtk/libamtk-@TEPL_API_VERSION@.la      \
-       $(DEP_LIBS)
+       $(TEPL_DEP_LIBS)
 
 libtepl_@TEPL_API_VERSION@_la_LDFLAGS =                \
        -version-info $(TEPL_LT_VERSION)        \
@@ -159,7 +159,7 @@ INTROSPECTION_COMPILER_ARGS =                       \
 
 Tepl_@TEPL_API_VERSION@_gir_NAMESPACE = Tepl
 Tepl_@TEPL_API_VERSION@_gir_VERSION = @TEPL_API_VERSION@
-Tepl_@TEPL_API_VERSION@_gir_CFLAGS = $(DEP_CFLAGS)
+Tepl_@TEPL_API_VERSION@_gir_CFLAGS = $(TEPL_DEP_CFLAGS)
 Tepl_@TEPL_API_VERSION@_gir_SCANNERFLAGS = $(WARN_SCANNERFLAGS)
 Tepl_@TEPL_API_VERSION@_gir_LIBS = libtepl-@TEPL_API_VERSION@.la
 Tepl_@TEPL_API_VERSION@_gir_FILES =    \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cf91e19..1801db8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,13 +1,15 @@
 AM_CPPFLAGS =                  \
        -I$(top_srcdir)         \
        $(WARN_CFLAGS)          \
-       $(DEP_CFLAGS)
+       $(AMTK_DEP_CFLAGS)      \
+       $(TEPL_DEP_CFLAGS)
 
 AM_LDFLAGS = $(WARN_LDFLAGS)
 
-LDADD = $(top_builddir)/tepl/libtepl-core.la   \
-       $(top_builddir)/amtk/libamtk-core.la    \
-       $(DEP_LIBS)
+LDADD = $(top_builddir)/amtk/libamtk-core.la   \
+       $(top_builddir)/tepl/libtepl-core.la    \
+       $(AMTK_DEP_LIBS)                        \
+       $(TEPL_DEP_LIBS)
 
 noinst_PROGRAMS = $(TEST_PROGS)
 TEST_PROGS =
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 35422c4..1057c2d 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -13,13 +13,15 @@ VALGRIND_SUPPRESSIONS_FILES =                                       \
 AM_CPPFLAGS =                  \
        -I$(top_srcdir)         \
        $(WARN_CFLAGS)          \
-       $(DEP_CFLAGS)
+       $(AMTK_DEP_CFLAGS)      \
+       $(TEPL_DEP_CFLAGS)
 
 AM_LDFLAGS = $(WARN_LDFLAGS)
 
-LDADD = $(top_builddir)/tepl/libtepl-core.la   \
-       $(top_builddir)/amtk/libamtk-core.la    \
-       $(DEP_LIBS)
+LDADD = $(top_builddir)/amtk/libamtk-core.la   \
+       $(top_builddir)/tepl/libtepl-core.la    \
+       $(AMTK_DEP_LIBS)                        \
+       $(TEPL_DEP_LIBS)
 
 noinst_PROGRAMS = $(UNIT_TEST_PROGS)
 TESTS = $(UNIT_TEST_PROGS)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]