[libgdata] build: Split GOA symbols out into a separate symbols file



commit 0bb2901aa5d944e7e588a4fd9f57d3be96354dc5
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Sun Oct 4 13:35:38 2015 +0100

    build: Split GOA symbols out into a separate symbols file
    
    On some systems (Mac OS X) it is an error to include symbols in the
    symbols file which are not exported from the library. This can happen if
    building with --disable-goa (or --disable-gnome).
    
    Fix this by generating the symbols file dynamically.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754821

 HACKING                                     |    4 ++--
 Makefile.am                                 |   14 ++++++++++++--
 gdata/{gdata.symbols => gdata-core.symbols} |    3 ---
 gdata/gdata-goa.symbols                     |    3 +++
 4 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/HACKING b/HACKING
index 69177c2..32917c7 100644
--- a/HACKING
+++ b/HACKING
@@ -95,7 +95,7 @@ Adding public API
  - All public API must have a gtk-doc comment, and be added to the docs/reference/gdata-sections.txt file, 
to include it in the documentation.
    The documentation comment must have a "Since" clause (see "Documentation comments" section).
 
- - All public API must be listed in gdata/gdata.symbols.
+ - All public API must be listed in gdata/gdata-*.symbols.
 
  - Non-trivial API should have a test case added in the relevant test suite file in gdata/tests. Note that 
the "general" test suite file cannot make
    network requests in the course of running its test cases.
@@ -157,7 +157,7 @@ deprecating API:
    If this isn't possible, the deprecated function should be split into a static function which contains all 
the code, and the public symbol should
    become a simple wrapper of this static function. This allows the static function to be used inside 
libgdata without causing deprecation warnings.
 
- - Don't remove deprecated symbols from gdata.symbols.
+ - Don't remove deprecated symbols from gdata-*.symbols.
 
  - Don't forget to also deprecate related symbols, such as the getter/setter for a property (or vice-versa).
 
diff --git a/Makefile.am b/Makefile.am
index 996a24e..cb8d4e9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -529,12 +529,22 @@ gdata_libgdata_la_LIBADD = \
 
 gdata_libgdata_la_LDFLAGS = \
        -version-info $(GDATA_LT_VERSION)       \
-       -export-symbols $(srcdir)/gdata/gdata.symbols   \
+       -export-symbols $(builddir)/gdata/gdata.symbols \
        -no-undefined                           \
        $(WARN_LDFLAGS) \
        $(AM_LDFLAGS)
 
-EXTRA_DIST += gdata/gdata.symbols
+# Symbols file
+gdata/gdata.symbols: gdata/gdata-core.symbols gdata/gdata-goa.symbols
+if ENABLE_GOA
+       $(AM_V_GEN)cat gdata/gdata-core.symbols gdata/gdata-goa.symbols > $@
+else
+       $(AM_V_GEN)cat gdata/gdata-core.symbols > $@
+endif
+
+EXTRA_gdata_libgdata_la_DEPENDENCIES = gdata/gdata.symbols
+EXTRA_DIST += gdata/gdata-core.symbols gdata/gdata-goa.symbols
+CLEANFILES += gdata/gdata.symbols
 
 # Check if gdata.h includes all the public headers
 check-local: check-headers
diff --git a/gdata/gdata.symbols b/gdata/gdata-core.symbols
similarity index 99%
rename from gdata/gdata.symbols
rename to gdata/gdata-core.symbols
index dad803e..7cda0b6 100644
--- a/gdata/gdata.symbols
+++ b/gdata/gdata-core.symbols
@@ -971,9 +971,6 @@ gdata_documents_entry_get_quota_used
 gdata_documents_service_copy_document
 gdata_documents_service_copy_document_async
 gdata_documents_service_copy_document_finish
-gdata_goa_authorizer_get_type
-gdata_goa_authorizer_new
-gdata_goa_authorizer_get_goa_object
 gdata_documents_document_get_thumbnail_uri
 gdata_tasks_task_get_type
 gdata_tasks_task_new
diff --git a/gdata/gdata-goa.symbols b/gdata/gdata-goa.symbols
new file mode 100644
index 0000000..f870ec1
--- /dev/null
+++ b/gdata/gdata-goa.symbols
@@ -0,0 +1,3 @@
+gdata_goa_authorizer_get_type
+gdata_goa_authorizer_new
+gdata_goa_authorizer_get_goa_object


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