[gtksourceview/wip/loader-saver: 31/42] build: compile all the files in the private .la



commit 6d30a1297fd107b21f943367926b7f521eadf69a
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Mar 7 16:26:50 2014 +0100

    build: compile all the files in the private .la
    
    There are problems for linking the buffer-output-stream unit tests.
    
    - The unit tests cover gtksourcebufferoutputstream.c.
    - gtksourcebufferoutputstream.c is built in libgtksourceview-private.la.
    - gtksourcebufferoutputstream.c uses a private function built in
      libgtksourceview-3.0.la (_gtk_source_buffer_set_as_invalid_character()).
    
    I get this error when linking the unit tests:
    undefined reference to `_gtk_source_buffer_set_as_invalid_character'
    
    It seems that the problem is that the private.la is not self-contained.
    By compiling _all_ the files in the private.la, it works. The real
    library just links the private.la and other stuff, without compiling
    anything.

 gtksourceview/Makefile.am |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gtksourceview/Makefile.am b/gtksourceview/Makefile.am
index 7151559..e2c5071 100644
--- a/gtksourceview/Makefile.am
+++ b/gtksourceview/Makefile.am
@@ -131,25 +131,25 @@ noinst_LTLIBRARIES = libgtksourceview-private.la
 
 libgtksourceview_private_la_SOURCES =          \
        $(libgtksourceview_private_c_files)     \
-       $(libgtksourceview_private_headers)
+       $(libgtksourceview_private_headers)     \
+       $(libgtksourceview_c_files)             \
+       $(libgtksourceview_headers)
+
+# do not distribute generated files
+nodist_libgtksourceview_private_la_SOURCES =   \
+       $(BUILT_SOURCES)
 
 libgtksourceview_private_la_CFLAGS =   \
        $(CODE_COVERAGE_CFLAGS)
 
-libgtksourceview_private_la_LDFLAGS =          \
-       -no-undefined                           \
+libgtksourceview_private_la_LDFLAGS =  \
+       -no-undefined                   \
        $(CODE_COVERAGE_LDFLAGS)
 
 # The real library
 lib_LTLIBRARIES = libgtksourceview-3.0.la
 
-libgtksourceview_3_0_la_SOURCES =      \
-       $(libgtksourceview_c_files)     \
-       $(libgtksourceview_headers)
-
-# do not distribute generated files
-nodist_libgtksourceview_3_0_la_SOURCES =\
-       $(BUILT_SOURCES)
+libgtksourceview_3_0_la_SOURCES =
 
 libgtksourceview_3_0_la_LIBADD =                                       \
        libgtksourceview-private.la                                     \


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