[gtk-mac-integration] Fix Python and Documentation builds broken by a7cec796.



commit 42904240d292a99de88735ff99e8e1788e79e586
Author: John Ralls <jralls ceridwen us>
Date:   Thu May 21 14:59:37 2015 -0700

    Fix Python and Documentation builds broken by a7cec796.

 acinclude.m4                                   |    6 ++--
 bindings/python/Makefile.am                    |    2 +-
 bindings/python/gtkmacintegration/Makefile.am  |   35 +++++++++++++++++++-----
 bindings/python/gtkosx_application/Makefile.am |    4 +-
 docs/reference/Makefile.am                     |    9 +++++-
 5 files changed, 41 insertions(+), 15 deletions(-)
---
diff --git a/acinclude.m4 b/acinclude.m4
index 6945eda..592d82e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -61,7 +61,7 @@ AC_DEFUN([GTK_PYTHON_CHECK],
     AC_MSG_CHECKING([Python Headers])
     AM_CHECK_PYTHON_HEADERS(,[AC_MSG_RESULT([Python headers not found])])
     AC_MSG_NOTICE([Switch on Gtk+ Version])
-    AS_IF([ test x$GTK_MAJOR = "xgtk+-2.0" -o x$enable_python = "xall"], [
+    AS_IF([ test x$with_gtk2 = "xyes" -o x$enable_python = "xall"], [
     dnl Check for PyGTK
         AC_MSG_CHECKING([PyGObject 2.16 or newer])
         PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= 2.16.0,,have_pygobject=no)
@@ -90,7 +90,7 @@ AC_DEFUN([GTK_PYTHON_CHECK],
        AC_SUBST(PYGOBJECT_DATADIR)
        AC_MSG_RESULT($PYGOBJECT_DATADIR)
      ],
-     [ test x$GTK_MAJOR = "xgtk+-3.0" -o x$enable_python = "xall"],
+     [ test x$with_gtk3 = "xyes" -o x$enable_python = "xall"],
 dnl Check that pygobject and gtk-3.0.gir are present
      [ PKG_CHECK_MODULES(PYGOBJECT_2, pygobject-2.0 >= 2.28.0,[
        AC_MSG_CHECKING([PyGObject-Codegen-2.0])
@@ -130,6 +130,6 @@ dnl Check that pygobject and gtk-3.0.gir are present
   AC_MSG_RESULT($enable_python)
 
   AM_CONDITIONAL([ENABLE_PYTHON], [test x$enable_python = xyes])
-  AM_CONDITIONAL([GTK_VERSION_2], [test "x$GTK_MAJOR" = "xgtk+-2.0" -o x$enable_python = "xall"])
+  AM_CONDITIONAL([GTK_VERSION_2], [test "x$with_gtk2" = "xyes" -o x$enable_python = "xall"])
 ])
 dnl -----------------------------------------------------------
diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
index 942be1b..8a00652 100644
--- a/bindings/python/Makefile.am
+++ b/bindings/python/Makefile.am
@@ -1,4 +1,4 @@
-if GTK_VERSION_2
+if WITH_GTK2
   GTK_COCOA_DIR = gtkosx_application
 if !SIXTY_FOUR_BIT
   GTK_CARBON_DIR = gtkmacintegration
diff --git a/bindings/python/gtkmacintegration/Makefile.am b/bindings/python/gtkmacintegration/Makefile.am
index 3f8562e..081e039 100644
--- a/bindings/python/gtkmacintegration/Makefile.am
+++ b/bindings/python/gtkmacintegration/Makefile.am
@@ -3,7 +3,9 @@ AM_CPPFLAGS = -I$(top_srcdir)/src $(PYTHON_INCLUDES)
 gtkmacintegrationdir = $(libdir)/python$(PYTHON_VERSION)/site-packages/gtkmacintegration
 
 gtkmacintegration_PYTHON = __init__.py
-gtkmacintegration_LTLIBRARIES = _gtkmacintegration.la
+gtkmacintegration_LTLIBRARIES =
+
+
 
 headers =                                              \
        $(top_srcdir)/src/gtk-mac-menu.h                \
@@ -15,23 +17,42 @@ gtkmacintegration.defs: $(headers)
 
 gtkmacintegration.c: gtkmacintegration.defs gtkmacintegration.override
 
-_gtkmacintegration_la_CFLAGS =                         \
+if WITH_GTK2
+gtkmacintegration_LTLIBRARIES += _gtkmacintegration-gtk2.la
+_gtkmacintegration_gtk2_la_CFLAGS =                            \
+       $(MAC_CFLAGS)                                   \
+       $(PYGTK_CFLAGS)
+_gtkmacintegration_gtk2_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gtkmacintegration
+_gtkmacintegration_gtk2_la_LIBADD =                            \
+       $(MAC_LIBS)                                     \
+       $(PYGTK_LIBS)                                   \
+       $(top_builddir)/src/libgtkmacintegration-gtk2.la
+
+_gtkmacintegration_gtk2_la_SOURCES =                           \
+       gtkmacintegration.c                             \
+       gtkmacintegration-module.c
+endif
+if WITH_GTK3
+gtkmacintegration_LTLIBRARIES += _gtkmacintegration-gtk3.la
+_gtkmacintegration_gtk3_la_CFLAGS =                            \
        $(MAC_CFLAGS)                                   \
        $(PYGTK_CFLAGS)
-_gtkmacintegration_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gtkmacintegration
-_gtkmacintegration_la_LIBADD =                         \
+_gtkmacintegration_gtk3_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gtkmacintegration
+_gtkmacintegration_gtk3_la_LIBADD =                            \
        $(MAC_LIBS)                                     \
        $(PYGTK_LIBS)                                   \
-       $(top_builddir)/src/libgtkmacintegration- GTK_MAC_INTEGRATION_LIB_SUFFIX@.la
-_gtkmacintegration_la_SOURCES =                                \
+       $(top_builddir)/src/libgtkmacintegration-gtk3.la
+
+_gtkmacintegration_gtk3_la_SOURCES =                           \
        gtkmacintegration.c                             \
        gtkmacintegration-module.c
+endif
 
 .defs.c: 
        ($(PYGOBJECT_CODEGEN)                           \
            --register $(PYGTK_DEFSDIR)/gdk-types.defs  \
            --register $(PYGTK_DEFSDIR)/gtk-types.defs  \
-           --override $*.override                      \
+           --override ${srcdir}/$*.override                    \
            --prefix $* $<) > gen-$*.c                  \
        && cp gen-$*.c $*.c                             \
        && rm -f gen-$*.c
diff --git a/bindings/python/gtkosx_application/Makefile.am b/bindings/python/gtkosx_application/Makefile.am
index 7744737..b39c993 100644
--- a/bindings/python/gtkosx_application/Makefile.am
+++ b/bindings/python/gtkosx_application/Makefile.am
@@ -19,8 +19,8 @@ _gtkosx_application_la_LDFLAGS = -module -avoid-version -export-symbols-regex in
 _gtkosx_application_la_LIBADD =                                \
        $(MAC_LIBS)                                     \
        $(PYGTK_LIBS)                                   \
-       $(top_builddir)/src/libgtkmacintegration- GTK_MAC_INTEGRATION_LIB_SUFFIX@.la
-_gtkosx_application_la_SOURCES =                               \
+       $(top_builddir)/src/libgtkmacintegration-gtk2.la
+_gtkosx_application_la_SOURCES =                       \
        gtkosx_application.c                            \
        gtkosx_application-module.c
 
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 55d4c7f..5f3b83e 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -85,8 +85,13 @@ expand_content_files=
 # signals and properties.
 # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
 # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS=$(GLIB_CFLAGS)
-GTKDOC_LIBS=$(top_builddir)/src/libgtkmacintegration- GTK_MAC_INTEGRATION_LIB_SUFFIX@.la -lgobject-2.0
+GTKDOC_CFLAGS = $(GLIB_CFLAGS)
+GTKDOC_LIBS = -lgobject-2.0
+if WITH_GTK2
+GTKDOC_LIBS += $(top_builddir)/src/libgtkmacintegration-gtk2.la
+else
+GTKDOC_LIBS += $(top_builddir)/src/libgtkmacintegration-gtk3.la
+endif
 DYLD_LOAD_PATH=$(top_builddir)/src/.libs
 
 # This includes the standard gtk-doc make rules, copied by gtkdocize.


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