[glom] Build: Avoid use of non-UI cflags/libs where not necessary.



commit 3ce5653736b97897119bd1b56ac5afe270703f6a
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Dec 14 11:41:00 2010 +0100

    Build: Avoid use of non-UI cflags/libs where not necessary.
    
    * Makefile.am: Do not use AM_CPPFLAGS, AM_CFLAGS or AM_CXXFLAGS.
    * Makefile_glom.am:
    * Makefile_libglom.am:
    * Makefile_tests.am: Instead use individual variables for each target,
    making sure that we use only the necessary flags.
    libglom may have been linking to some unnecessary UI libraries before.
    * glom/import_csv/csv_parser.h: Avoid unnecessary UI includes.
    * tests/import/test_parsing.cc:
    * tests/import/test_signals.cc: Avoid including gtkmm.h.
    
    As a side-effect, the build is now longer, because some files are now
    compiled again separately for the tests, presumably because they now need
    to be built with different compiler flags. But that is a better test.

 ChangeLog                    |   18 +++++
 Makefile.am                  |   51 +++------------
 Makefile_glom.am             |   13 ++++
 Makefile_libglom.am          |   34 ++++++++++-
 Makefile_tests.am            |  146 ++++++++++++++++++++++++++++++++----------
 glom/import_csv/csv_parser.h |    4 +-
 tests/import/test_parsing.cc |   10 ++-
 tests/import/test_signals.cc |    8 ++-
 8 files changed, 201 insertions(+), 83 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cdf1549..de17c72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2010-12-14  Murray Cumming  <murrayc murrayc com>
+
+	Build: Avoid use of non-UI cflags/libs where not necessary. 
+
+	* Makefile.am: Do not use AM_CPPFLAGS, AM_CFLAGS or AM_CXXFLAGS.
+	* Makefile_glom.am:
+	* Makefile_libglom.am:
+	* Makefile_tests.am: Instead use individual variables for each target, 
+	making sure that we use only the necessary flags.
+	libglom may have been linking to some unnecessary UI libraries before.
+	* glom/import_csv/csv_parser.h: Avoid unnecessary UI includes.
+	* tests/import/test_parsing.cc:
+	* tests/import/test_signals.cc: Avoid including gtkmm.h.
+	
+	As a side-effect, the build is now longer, because some files are now 
+	compiled again separately for the tests, presumably because they now need 
+	to be built with different compiler flags. But that is a better test.
+
 2010-12-13  Murray Cumming  <murrayc murrayc com>
 
 	Correct my previous commit.
diff --git a/Makefile.am b/Makefile.am
index 2ab51d0..83826b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,33 +54,24 @@ win_resfile =
 endif
 SUFFIXES = .rc .res
 
+glom_includes = -I$(top_builddir)/glom -I$(top_srcdir)/glom -I$(top_builddir) -I$(top_srcdir)
+
 include Makefile_libglom.am
 
+glom_defines = \
+-DGLOM_DATADIR=\""$(datadir)"\" \
+-DGLOM_DOCDIR_EXAMPLES=\""$(docdir)/examples"\" \
+-DGLOM_DOCDIR_EXAMPLES_NOTINSTALLED=\""$(abs_top_srcdir)/examples"\" \
+-DGLOM_LOCALEDIR=\""$(glom_localedir)"\" \
+-DGLOM_PKGDATADIR=\""$(pkgdatadir)"\" \
+-DGLOM_PKGDATADIR_NOTINSTALLED=\""$(top_srcdir)/glom"\"
+
 if GLOM_ENABLE_UI
 include Makefile_glom.am
 endif
 
 include Makefile_tests.am
 
-glom_python_embed_python_module_glom_ GLOM_ABI_VERSION_UNDERLINED@_la_SOURCES = \
-	glom/python_embed/python_module/py_glom_module.cc	\
-	glom/python_embed/python_module/py_glom_module.h
-
-glom_python_embed_python_module_glom_ GLOM_ABI_VERSION_UNDERLINED@_la_LIBADD = \
-	glom/libglom/libglom-$(GLOM_ABI_VERSION).la \
-	$(PYTHON_LIBS) $(BOOST_PYTHON_LIBS)
-
-if HOST_WIN32
-pymod_ldflags = -module -avoid-version -no-undefined -shrext .pyd
-else
-pymod_ldflags = -module -avoid-version -no-undefined
-endif
-glom_pyexport = -export-symbols-regex '^_*initglom'
-glom_python_embed_python_module_glom_ GLOM_ABI_VERSION_UNDERLINED@_la_LDFLAGS = $(pymod_ldflags) $(glom_pyexport)
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = glom/libglom/glom- GLOM_ABI_VERSION@.pc
-
 dist_pkgdata_DATA = glom/glom_document.dtd
 
 gladedir = $(pkgdatadir)/glade
@@ -176,28 +167,6 @@ MAINTAINERCLEANFILES = \
 	macros/libtool.m4 macros/ltoptions.m4 macros/ltsugar.m4 \
 	macros/ltversion.m4 macros/lt~obsolete.m4
 
-# The location of the gettext catalogs as defined by intltool.
-glom_localedir = $(prefix)/$(DATADIRNAME)/locale
-
-glom_includes = -I$(top_builddir)/glom -I$(top_srcdir)/glom -I$(top_builddir) -I$(top_srcdir)
-
-#Let gimpruler build without changing the paths in its source code:
-glom_includes += -I$(top_srcdir)/glom/utility_widgets/gimpruler
-
-# We use += because this is set first in Makefile_tests.am:
-glom_defines += \
--DGLOM_DATADIR=\""$(datadir)"\" \
--DGLOM_DOCDIR_EXAMPLES=\""$(docdir)/examples"\" \
--DGLOM_DOCDIR_EXAMPLES_NOTINSTALLED=\""$(abs_top_srcdir)/examples"\" \
--DGLOM_LOCALEDIR=\""$(glom_localedir)"\" \
--DGLOM_PKGDATADIR=\""$(pkgdatadir)"\" \
--DGLOM_PKGDATADIR_NOTINSTALLED=\""$(top_srcdir)/glom"\"
-
-
-AM_CPPFLAGS = $(glom_includes) $(GLOM_CFLAGS) $(PYTHON_CPPFLAGS) $(BOOST_PYTHON_CFLAGS) $(glom_defines)
-AM_CFLAGS   = $(GLOM_WFLAGS)
-AM_CXXFLAGS = $(GLOM_WXXFLAGS)
-
 update_mime_database = update-mime-database
 update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
 
diff --git a/Makefile_glom.am b/Makefile_glom.am
index 28c026f..fcc6854 100644
--- a/Makefile_glom.am
+++ b/Makefile_glom.am
@@ -15,8 +15,21 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+
+# The location of the gettext catalogs as defined by intltool.
+glom_localedir = $(prefix)/$(DATADIRNAME)/locale
+
+#Let gimpruler build without changing the paths in its source code:
+glom_includes += -I$(top_srcdir)/glom/utility_widgets/gimpruler
+
+
+
 bin_PROGRAMS = glom/glom
 
+glom_glom_CPPFLAGS = $(glom_includes) $(GLOM_CFLAGS) $(PYTHON_CPPFLAGS) $(BOOST_PYTHON_CFLAGS) $(glom_defines)
+glom_glom_CFLAGS   = $(GLOM_WFLAGS)
+glom_glom_CXXFLAGS = $(GLOM_WXXFLAGS)
+
 glom_source_files = \
 	glom/application.cc						\
 	glom/application.h						\
diff --git a/Makefile_libglom.am b/Makefile_libglom.am
index 668599a..e3f330b 100644
--- a/Makefile_libglom.am
+++ b/Makefile_libglom.am
@@ -16,7 +16,6 @@
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 lib_LTLIBRARIES = glom/libglom/libglom- GLOM_ABI_VERSION@.la
-pyexec_LTLIBRARIES = glom/python_embed/python_module/glom_ GLOM_ABI_VERSION_UNDERLINED@.la
 
 include $(top_srcdir)/glom/libglom/filelist.am
 
@@ -43,7 +42,40 @@ libglom_d_b_view_include_HEADERS = $(libglom_d_b_view_headers)
 
 glom_libglom_libglom_ GLOM_ABI_VERSION@_la_SOURCES = $(libglom_sources)
 glom_libglom_libglom_ GLOM_ABI_VERSION@_la_LIBADD  = $(LIBGLOM_LIBS) $(PYTHON_LIBS) $(BOOST_PYTHON_LIBS)
+
 if HOST_WIN32
 glom_libglom_libglom_ GLOM_ABI_VERSION@_la_LIBADD += -lws2_32
 endif
 glom_libglom_libglom_ GLOM_ABI_VERSION@_la_LDFLAGS = -no-undefined
+
+glom_libglom_libglom_ GLOM_ABI_VERSION@_la_CPPFLAGS = $(glom_includes) $(LIBGLOM_CFLAGS) $(PYTHON_CPPFLAGS) $(BOOST_PYTHON_CFLAGS)
+glom_libglom_libglom_ GLOM_ABI_VERSION@_la_CFLAGS   = $(GLOM_WFLAGS)
+glom_libglom_libglom_ GLOM_ABI_VERSION@_la_CXXFLAGS = $(GLOM_WXXFLAGS)
+
+
+
+pyexec_LTLIBRARIES = glom/python_embed/python_module/glom_ GLOM_ABI_VERSION_UNDERLINED@.la
+
+glom_python_embed_python_module_glom_ GLOM_ABI_VERSION_UNDERLINED@_la_SOURCES = \
+	glom/python_embed/python_module/py_glom_module.cc	\
+	glom/python_embed/python_module/py_glom_module.h
+
+glom_python_embed_python_module_glom_ GLOM_ABI_VERSION_UNDERLINED@_la_LIBADD = \
+	glom/libglom/libglom-$(GLOM_ABI_VERSION).la \
+	$(PYTHON_LIBS) $(BOOST_PYTHON_LIBS)
+
+if HOST_WIN32
+pymod_ldflags = -module -avoid-version -no-undefined -shrext .pyd
+else
+pymod_ldflags = -module -avoid-version -no-undefined
+endif
+glom_pyexport = -export-symbols-regex '^_*initglom'
+glom_python_embed_python_module_glom_ GLOM_ABI_VERSION_UNDERLINED@_la_LDFLAGS = $(pymod_ldflags) $(glom_pyexport)
+glom_python_embed_python_module_glom_ GLOM_ABI_VERSION_UNDERLINED@_la_CPPFLAGS = $(glom_includes) $(LIBGLOM_CFLAGS) $(PYTHON_CPPFLAGS) $(BOOST_PYTHON_CFLAGS)
+glom_python_embed_python_module_glom_ GLOM_ABI_VERSION_UNDERLINED@_la_CFLAGS   = $(GLOM_WFLAGS)
+glom_python_embed_python_module_glom_ GLOM_ABI_VERSION_UNDERLINED@_la_CXXFLAGS = $(GLOM_WXXFLAGS)
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = glom/libglom/glom- GLOM_ABI_VERSION@.pc
+
+
diff --git a/Makefile_tests.am b/Makefile_tests.am
index a446228..a2a3f12 100644
--- a/Makefile_tests.am
+++ b/Makefile_tests.am
@@ -53,35 +53,83 @@ dist_noinst_SCRIPTS = tests/test_dtd_file_validation.sh \
 
 # This also links to the libraries in LIBGLOM_LIBS
 tests_ldadd = glom/libglom/libglom-$(GLOM_ABI_VERSION).la
+tests_cppflags = $(glom_includes) $(LIBGLOM_CFLAGS) $(PYTHON_CPPFLAGS) $(BOOST_PYTHON_CFLAGS) $(glom_defines)
+tests_cppflags_ui = $(glom_includes) $(GLOM_CFLAGS) $(PYTHON_CPPFLAGS) $(BOOST_PYTHON_CFLAGS) $(glom_defines)
+tests_cflags   = $(GLOM_WFLAGS)
+tests_cxxflags = $(GLOM_WXXFLAGS)
 
 glom_libglom_test_connectionpool_SOURCES = glom/libglom/test_connectionpool.cc
+glom_libglom_test_connectionpool_LDADD = $(tests_ldadd)
+glom_libglom_test_connectionpool_CPPFLAGS = $(tests_cppflags)
+glom_libglom_test_connectionpool_CFLAGS = $(tests_cflags)
+glom_libglom_test_connectionpool_CXXFLAGS = $(tests_cxxflags)
+
 glom_libglom_example_document_load_SOURCES = glom/libglom/example_document_load.cc
-glom_libglom_test_sharedptr_layoutitem_SOURCES = glom/libglom/test_sharedptr_layoutitem.cc
+glom_libglom_example_document_load_LDADD = $(tests_ldadd)
+glom_libglom_example_document_load_CPPFLAGS = $(tests_cppflags)
+glom_libglom_example_document_load_CFLAGS = $(tests_cflags)
+glom_libglom_example_document_load_CXXFLAGS = $(tests_cxxflags)
 
+glom_libglom_test_sharedptr_layoutitem_SOURCES = glom/libglom/test_sharedptr_layoutitem.cc
+glom_libglom_test_sharedptr_layoutitem_LDADD = $(tests_ldadd)
+glom_libglom_test_sharedptr_layoutitem_CPPFLAGS = $(tests_cppflags)
+glom_libglom_test_sharedptr_layoutitem_CFLAGS = $(tests_cflags)
+glom_libglom_test_sharedptr_layoutitem_CXXFLAGS = $(tests_cxxflags)
 
 tests_test_document_load_SOURCES = tests/test_document_load.cc
+tests_test_document_load_LDADD = $(tests_ldadd)
+tests_test_document_load_CPPFLAGS = $(tests_cppflags)
+tests_test_document_load_CFLAGS = $(tests_cflags)
+tests_test_document_load_CXXFLAGS = $(tests_cxxflags)
+
 tests_test_document_autosave_SOURCES = tests/test_document_autosave.cc
+tests_test_document_autosave_LDADD = $(tests_ldadd)
+tests_test_document_autosave_CPPFLAGS = $(tests_cppflags)
+tests_test_document_autosave_CFLAGS = $(tests_cflags)
+tests_test_document_autosave_CXXFLAGS = $(tests_cxxflags)
+
 tests_test_parsing_time_SOURCES = tests/test_parsing_time.cc
+tests_test_parsing_time_LDADD = $(tests_ldadd)
+tests_test_parsing_time_CPPFLAGS = $(tests_cppflags)
+tests_test_parsing_time_CFLAGS = $(tests_cflags)
+tests_test_parsing_time_CXXFLAGS = $(tests_cxxflags)
+
 tests_test_signal_reemit_SOURCES = tests/test_signal_reemit.cc
+tests_test_signal_reemit_LDADD = $(LIBGLOM_LIBS)
+tests_test_signal_reemit_CPPFLAGS = $(tests_cppflags)
+tests_test_signal_reemit_CFLAGS = $(tests_cflags)
+tests_test_signal_reemit_CXXFLAGS = $(tests_cxxflags)
+
 tests_test_load_python_library_SOURCES = tests/test_load_python_library.cc
-tests_test_python_module_SOURCES = tests/test_python_module.cc
+tests_test_load_python_library_LDADD = $(LIBGLOM_LIBS) -ldl
+tests_test_load_python_library_CPPFLAGS = $(tests_cppflags)
+tests_test_load_python_library_CFLAGS = $(tests_cflags)
+tests_test_load_python_library_CXXFLAGS = $(tests_cxxflags)
 
+tests_test_python_module_SOURCES = tests/test_python_module.cc
+tests_test_python_module_LDADD = $(tests_ldadd) $(PYTHON_LIBS)
+tests_test_python_module_CPPFLAGS = $(tests_cppflags)
+tests_test_python_module_CFLAGS = $(tests_cflags)
+tests_test_python_module_CXXFLAGS = $(tests_cxxflags)
 
 
 # Distribute the tests data:
 dist_noinst_DATA = tests/import/data/albums.csv
 
-# Let the .cc source code know about this path:
-glom_defines = \
--DGLOM_TESTS_IMPORT_DATA_NOTINSTALLED=\""$(abs_top_srcdir)/tests/import/data/"\"
-
+# Let the .cc source code know about this path: TODO: Actually use this.
+glom_test_import_defines = DGLOM_TESTS_IMPORT_DATA_NOTINSTALLED=\""$(abs_top_srcdir)/tests/import/data/"\"
+  
+  
 tests_import_test_parsing_SOURCES =	\
 	glom/import_csv/csv_parser.cc	\
 	glom/import_csv/csv_parser.h	\
 	tests/import/utils.cc\
 	tests/import/utils.h\
 	tests/import/test_parsing.cc
-
+tests_import_test_parsing_LDADD = $(GLOM_LIBS)
+tests_import_test_parsing_CPPFLAGS = $(tests_cppflags) $(glom_test_import_defines)
+tests_import_test_parsing_CFLAGS = $(tests_cflags)
+tests_import_test_parsing_CXXFLAGS = $(tests_cxxflags)
 
 tests_import_test_signals_SOURCES =	\
 	glom/import_csv/csv_parser.cc	\
@@ -89,25 +137,22 @@ tests_import_test_signals_SOURCES =	\
 	tests/import/utils.cc\
 	tests/import/utils.h\
 	tests/import/test_signals.cc
-tests_test_selfhosting_new_empty_SOURCES = tests/test_selfhosting_new_empty.cc $(glom_source_files)
-tests_test_selfhosting_new_from_example_SOURCES = tests/test_selfhosting_new_from_example.cc $(glom_source_files)
-
-
-glom_libglom_test_connectionpool_LDADD = $(tests_ldadd)
-glom_libglom_example_document_load_LDADD = $(tests_ldadd)
-glom_libglom_test_sharedptr_layoutitem_LDADD = $(tests_ldadd)
-
-tests_test_parsing_time_LDADD = $(tests_ldadd)
-tests_test_document_load_LDADD = $(tests_ldadd)
-tests_test_document_autosave_LDADD = $(tests_ldadd)
-tests_test_signal_reemit_LDADD = $(LIBGLOM_LIBS)
-tests_test_load_python_library_LDADD = $(LIBGLOM_LIBS) -ldl
-tests_test_python_module_LDADD = $(tests_ldadd) $(PYTHON_LIBS)
-tests_import_test_parsing_LDADD = $(GLOM_LIBS)
 tests_import_test_signals_LDADD = $(GLOM_LIBS)
+tests_import_test_signals_CPPFLAGS = $(tests_cppflags)
+tests_import_test_signals_CFLAGS = $(tests_cflags)
+tests_import_test_signals_CXXFLAGS = $(tests_cxxflags)
+
+tests_test_selfhosting_new_empty_SOURCES = tests/test_selfhosting_new_empty.cc
 tests_test_selfhosting_new_empty_LDADD = $(glom_all_libs)
-tests_test_selfhosting_new_from_example_LDADD = $(glom_all_libs)
+tests_test_selfhosting_new_empty_CPPFLAGS = $(tests_cppflags)
+tests_test_selfhosting_new_empty_CFLAGS = $(tests_cflags)
+tests_test_selfhosting_new_empty_CXXFLAGS = $(tests_cxxflags)
 
+tests_test_selfhosting_new_from_example_SOURCES = tests/test_selfhosting_new_from_example.cc
+tests_test_selfhosting_new_from_example_LDADD = $(glom_all_libs)
+tests_test_selfhosting_new_from_example_CPPFLAGS = $(tests_cppflags)
+tests_test_selfhosting_new_from_example_CFLAGS = $(tests_cflags)
+tests_test_selfhosting_new_from_example_CXXFLAGS = $(tests_cxxflags)
 
 
 
@@ -118,7 +163,6 @@ if GLOM_ENABLE_UI
 # TODO: Shouldn't test_pyembed be non-UI?
 check_PROGRAMS += \
 	glom/utility_widgets/test_flowtable			\
-	glom/mode_data/test_flowtablewithfields \
 	glom/test_pyembed \
 	tests/test_glade_derived_instantiation \
 	tests/glade_toplevels_instantiation \
@@ -127,6 +171,7 @@ check_PROGRAMS += \
 	tests/test_python_execute_func_date \
 	tests/test_python_execute_func_change_result_type \
 	tests/test_python_execute_script
+#	glom/mode_data/test_flowtablewithfields
 
 TESTS += \
 	tests/test_glade_toplevels_instantiation.sh \
@@ -147,28 +192,54 @@ glom_utility_widgets_test_flowtable_SOURCES =	\
 	glom/utility_widgets/eggspreadtablemm/private/eggspreadtablemm_p.h \
 	glom/utility_widgets/test_flowtable.cc
 glom_utility_widgets_test_flowtable_LDADD = $(GLOM_LIBS)
+glom_utility_widgets_test_flowtable_CPPFLAGS = $(tests_cppflags_ui)
+glom_utility_widgets_test_flowtable_CFLAGS = $(tests_cflags)
+glom_utility_widgets_test_flowtable_CXXFLAGS = $(tests_cxxflags)
+
+# Disabled because it slows down the build, because it builds all Glom files again, using its own flags:
+#glom_mode_data_test_flowtablewithfields_SOURCES =	\
+#	$(glom_source_files) \
+#	glom/mode_data/test_flowtablewithfields.cc
+#glom_mode_data_test_flowtablewithfields_LDADD = $(glom_all_libs)
+#glom_mode_data_test_flowtablewithfields_CPPFLAGS = $(tests_cppflags_ui)
+#glom_mode_data_test_flowtablewithfields_CFLAGS = $(tests_cflags)
+#glom_mode_data_test_flowtablewithfields_CXXFLAGS = $(tests_cxxflags)
 
-glom_mode_data_test_flowtablewithfields_SOURCES =	\
-	$(glom_source_files) \
-	glom/mode_data/test_flowtablewithfields.cc
-glom_mode_data_test_flowtablewithfields_LDADD = $(glom_all_libs)
 
 tests_test_python_execute_func_SOURCES = tests/test_python_execute_func.cc \
   glom/python_embed/glom_python.cc
+tests_test_python_execute_func_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
+tests_test_python_execute_func_CPPFLAGS = $(tests_cppflags_ui)
+tests_test_python_execute_func_CFLAGS = $(tests_cflags)
+tests_test_python_execute_func_CXXFLAGS = $(tests_cxxflags)
+
 tests_test_python_execute_func_bad_syntax_SOURCES = tests/test_python_execute_func_bad_syntax.cc \
   glom/python_embed/glom_python.cc
+tests_test_python_execute_func_bad_syntax_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
+tests_test_python_execute_func_bad_syntax_CPPFLAGS = $(tests_cppflags_ui)
+tests_test_python_execute_func_bad_syntax_CFLAGS = $(tests_cflags)
+tests_test_python_execute_func_bad_syntax_CXXFLAGS = $(tests_cxxflags)
+
 tests_test_python_execute_func_date_SOURCES = tests/test_python_execute_func_date.cc \
   glom/python_embed/glom_python.cc
+tests_test_python_execute_func_date_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
+tests_test_python_execute_func_date_CPPFLAGS = $(tests_cppflags_ui)
+tests_test_python_execute_func_date_CFLAGS = $(tests_cflags)
+tests_test_python_execute_func_date_CXXFLAGS = $(tests_cxxflags)
+
 tests_test_python_execute_func_change_result_type_SOURCES = tests/test_python_execute_func_change_result_type.cc \
   glom/python_embed/glom_python.cc
+tests_test_python_execute_func_change_result_type_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
+tests_test_python_execute_func_change_result_type_CPPFLAGS = $(tests_cppflags_ui)
+tests_test_python_execute_func_change_result_type_CFLAGS = $(tests_cflags)
+tests_test_python_execute_func_change_result_type_CXXFLAGS = $(tests_cxxflags)
+
 tests_test_python_execute_script_SOURCES = tests/test_python_execute_script.cc \
   glom/python_embed/glom_python.cc
-
-tests_test_python_execute_func_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
-tests_test_python_execute_func_bad_syntax_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
-tests_test_python_execute_func_date_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
-tests_test_python_execute_func_change_result_type_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
 tests_test_python_execute_script_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LIBS)
+tests_test_python_execute_script_CPPFLAGS = $(tests_cppflags_ui)
+tests_test_python_execute_script_CFLAGS = $(tests_cflags)
+tests_test_python_execute_script_CXXFLAGS = $(tests_cxxflags)
 
 # You must remove PlaceholderGlom::get_application() to avoid having to specify
 # a huge set of .cc files when building this test:
@@ -187,11 +258,20 @@ tests_test_python_execute_script_LDADD = $(tests_ldadd) $(GLOM_LIBS) $(PYTHON_LI
 
 tests_test_glade_derived_instantiation_SOURCES = tests/test_glade_derived_instantiation.cc $(glom_source_files)
 tests_test_glade_derived_instantiation_LDADD = $(glom_all_libs)
+tests_test_glade_derived_instantiation_CPPFLAGS = $(tests_cppflags_ui)
+tests_test_glade_derived_instantiation_CFLAGS = $(tests_cflags)
+tests_test_glade_derived_instantiation_CXXFLAGS = $(tests_cxxflags)
 
 tests_glade_toplevels_instantiation_SOURCES = tests/glade_toplevels_instantiation.cc
 tests_glade_toplevels_instantiation_LDADD = $(tests_ldadd) $(GLOM_LIBS)
+tests_glade_toplevels_instantiation_CPPFLAGS = $(tests_cppflags_ui)
+tests_glade_toplevels_instantiation_CFLAGS = $(tests_cflags)
+tests_glade_toplevels_instantiation_CXXFLAGS = $(tests_cxxflags)
 
 glom_test_pyembed_SOURCES = glom/test_pyembed.cc
 glom_test_pyembed_LDADD = $(LIBGLOM_LIBS) $(PYTHON_LIBS)
+glom_test_pyembed_CPPFLAGS = $(tests_cppflags_ui)
+glom_test_pyembed_CFLAGS = $(tests_cflags)
+glom_test_pyembed_CXXFLAGS = $(tests_cxxflags)
 
 endif #GLOM_ENABLE_UI
diff --git a/glom/import_csv/csv_parser.h b/glom/import_csv/csv_parser.h
index ef904e9..45410fc 100644
--- a/glom/import_csv/csv_parser.h
+++ b/glom/import_csv/csv_parser.h
@@ -22,13 +22,13 @@
 #ifndef GLOM_CSV_PARSER_H
 #define GLOM_CSV_PARSER_H
 
-#include "base_db.h"
+//#include "base_db.h"
 
 #include <memory>
 #include <giomm/asyncresult.h>
 #include <giomm/file.h>
 #include <giomm/inputstream.h>
-#include <gtkmm/liststore.h>
+//#include <gtkmm/liststore.h>
 
 namespace Glom
 {
diff --git a/tests/import/test_parsing.cc b/tests/import/test_parsing.cc
index bb44403..0f541f7 100644
--- a/tests/import/test_parsing.cc
+++ b/tests/import/test_parsing.cc
@@ -1,7 +1,8 @@
 #include <glom/import_csv/csv_parser.h>
 #include <tests/import/utils.h>
 //#include <glibmm/regex.h>
-#include <gtkmm.h>
+#include <glibmm.h>
+#include <giomm.h>
 #include <iostream>
 #include <cstdlib>
 
@@ -79,10 +80,13 @@ void connect_signals(Glom::CsvParser& parser)
 } // namespace
 
 // Testcases
-int main(int argc, char* argv[])
+int main()
 {
   Glib::thread_init();
-  Gtk::Main gtk(argc, argv);
+  Glib::init();
+  Gio::init();
+
+  //Glib::RefPtr<Glib::MainLoop> mainloop = Glib::MainLoop::create();
 
   bool result = true;
   std::stringstream report;
diff --git a/tests/import/test_signals.cc b/tests/import/test_signals.cc
index 33304fc..046faf1 100644
--- a/tests/import/test_signals.cc
+++ b/tests/import/test_signals.cc
@@ -1,6 +1,7 @@
 #include <glom/import_csv/csv_parser.h>
 #include <tests/import/utils.h>
-#include <gtkmm.h>
+#include <glibmm.h>
+#include <giomm.h>
 #include <iostream>
 #include <stdexcept>
 #include <cstdlib>
@@ -52,10 +53,11 @@ void connect_signals(Glom::CsvParser& parser)
 } // namespace
 
 // Testcases
-int main(int argc, char* argv[])
+int main()
 {
   Glib::thread_init();
-  Gtk::Main gtk(argc, argv);
+  Glib::init();
+  Gio::init();
 
   bool result = true;
   std::stringstream report;



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