diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-02-21 14:09:03 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-02-21 14:19:50 +0200 |
commit | 136f53f58e89b13e4d89571fef25b8ba6679e6b4 (patch) | |
tree | 041ae83ed5d2ef45ccd09c5fb09947073c794993 | |
parent | f9a5c4cbc275df6dd5a3b31323b1d00343e8e4f0 (diff) |
More clever way to filter out component files for libs not built
I.e. BASIC stuff for iOS and database connectivity stuff when using
--disable-database-connectivity. All of this quite experimental so
far, using the latter will break your build.
-rw-r--r-- | sc/CppunitTest_sc_cellrangeobj.mk | 3 | ||||
-rw-r--r-- | sc/CppunitTest_sc_datapilotfieldobj.mk | 3 | ||||
-rw-r--r-- | sc/CppunitTest_sc_datapilottableobj.mk | 6 | ||||
-rw-r--r-- | sc/CppunitTest_sc_filters_test.mk | 6 | ||||
-rw-r--r-- | solenv/gbuild/CppunitTest.mk | 15 | ||||
-rw-r--r-- | sw/CppunitTest_sw_layout_test.mk | 2 | ||||
-rw-r--r-- | sw/CppunitTest_sw_macros_test.mk | 2 |
7 files changed, 22 insertions, 15 deletions
diff --git a/sc/CppunitTest_sc_cellrangeobj.mk b/sc/CppunitTest_sc_cellrangeobj.mk index 530aa9afaf8b..a559777482a4 100644 --- a/sc/CppunitTest_sc_cellrangeobj.mk +++ b/sc/CppunitTest_sc_cellrangeobj.mk @@ -91,8 +91,7 @@ $(eval $(call gb_CppunitTest_add_type_rdbs,sc_cellrangesbase,\ )) $(eval $(call gb_CppunitTest_add_components,sc_cellrangesbase,\ - $(if $(filter-out $(OS),IOS), \ - basic/util/sb) \ + basic/util/sb \ comphelper/util/comphelp \ configmgr/source/configmgr \ dbaccess/util/dba \ diff --git a/sc/CppunitTest_sc_datapilotfieldobj.mk b/sc/CppunitTest_sc_datapilotfieldobj.mk index 9b21db085c13..b1e54b02427c 100644 --- a/sc/CppunitTest_sc_datapilotfieldobj.mk +++ b/sc/CppunitTest_sc_datapilotfieldobj.mk @@ -90,8 +90,7 @@ $(eval $(call gb_CppunitTest_add_type_rdbs,sc_datapilotfieldobj,\ )) $(eval $(call gb_CppunitTest_add_components,sc_datapilotfieldobj,\ - $(if $(filter-out $(OS),IOS), \ - basic/util/sb) \ + basic/util/sb \ comphelper/util/comphelp \ configmgr/source/configmgr \ dbaccess/util/dba \ diff --git a/sc/CppunitTest_sc_datapilottableobj.mk b/sc/CppunitTest_sc_datapilottableobj.mk index 9e06aecf323b..1ac98937f848 100644 --- a/sc/CppunitTest_sc_datapilottableobj.mk +++ b/sc/CppunitTest_sc_datapilottableobj.mk @@ -90,12 +90,10 @@ $(eval $(call gb_CppunitTest_add_type_rdbs,sc_datapilottableobj,\ )) $(eval $(call gb_CppunitTest_add_components,sc_datapilottableobj,\ - $(if $(filter-out $(OS),IOS), \ - basic/util/sb) \ + basic/util/sb \ comphelper/util/comphelp \ configmgr/source/configmgr \ - $(if $(filter-out $(OS),IOS), \ - dbaccess/util/dba) \ + dbaccess/util/dba \ fileaccess/source/fileacc \ filter/source/config/cache/filterconfig1 \ forms/util/frm \ diff --git a/sc/CppunitTest_sc_filters_test.mk b/sc/CppunitTest_sc_filters_test.mk index 8a4a3ccc2840..32f7d47d8aaa 100644 --- a/sc/CppunitTest_sc_filters_test.mk +++ b/sc/CppunitTest_sc_filters_test.mk @@ -87,15 +87,13 @@ $(eval $(call gb_CppunitTest_add_type_rdbs,sc_filters_test,\ )) $(eval $(call gb_CppunitTest_add_components,sc_filters_test,\ - $(if $(filter-out $(OS),IOS), \ - basic/util/sb) \ + basic/util/sb \ chart2/source/controller/chartcontroller \ chart2/source/tools/charttools \ chart2/source/model/chartmodel \ comphelper/util/comphelp \ configmgr/source/configmgr \ - $(if $(filter-out $(OS),IOS), \ - dbaccess/util/dba) \ + dbaccess/util/dba \ eventattacher/source/evtatt \ fileaccess/source/fileacc \ filter/source/config/cache/filterconfig1 \ diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index e4065bd04189..acaf76bef49c 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -178,8 +178,21 @@ $(call gb_CppunitTest_get_target,$(1)) : \ endef +# Given a list of component files, filter out those corresponding +# to libraries not built in this configuration. +define gb_CppunitTest__filter_not_built_components +$(filter-out \ + $(if $(filter $(OS),IOS), \ + basic/util/sb \ + sw/util/vbaswobj \ + scripting/source/basprov/basprov \ + scripting/util/scriptframe) \ + $(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)),, \ + dbaccess/util/dba),$(1)) +endef + define gb_CppunitTest_add_components -$(foreach component,$(2),$(call gb_CppunitTest_add_component,$(1),$(component))) +$(foreach component,$(call gb_CppunitTest__filter_not_built_components,$(2)),$(call gb_CppunitTest_add_component,$(1),$(component))) endef diff --git a/sw/CppunitTest_sw_layout_test.mk b/sw/CppunitTest_sw_layout_test.mk index a14af327e459..97e6bf3cf42f 100644 --- a/sw/CppunitTest_sw_layout_test.mk +++ b/sw/CppunitTest_sw_layout_test.mk @@ -134,6 +134,6 @@ $(eval $(call gb_CppunitTest_set_args,sw_layout_test,\ $(call gb_CppunitTest_get_target,sw_layout_test) : \ $(call gb_Library_get_target,localedata_en) \ $(call gb_Library_get_target,msword) \ - $(call gb_Library_get_target,vbaswobj) \ + $(if $(filter-out $(OS),IOS),$(call gb_Library_get_target,vbaswobj)) \ # vim: set noet sw=4 ts=4: diff --git a/sw/CppunitTest_sw_macros_test.mk b/sw/CppunitTest_sw_macros_test.mk index a2f4c4e29d54..00d092a20ff0 100644 --- a/sw/CppunitTest_sw_macros_test.mk +++ b/sw/CppunitTest_sw_macros_test.mk @@ -136,6 +136,6 @@ $(eval $(call gb_CppunitTest_set_args,sw_macros_test,\ $(call gb_CppunitTest_get_target,sw_macros_test) : \ $(call gb_Library_get_target,localedata_en) \ $(call gb_Library_get_target,msword) \ - $(call gb_Library_get_target,vbaswobj) \ + $(if $(filter-out $(OS),IOS),$(call gb_Library_get_target,vbaswobj)) \ # vim: set noet sw=4 ts=4: |