From 6667caef24557d66177c1f7e9b72d2f609233d87 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 12 Sep 2013 13:10:32 +0200 Subject: gbuild: remove gb_Rdb__get_final_target ... by replacing gb_Rdb_install with a separate constructor so the right target can be registered at the module. There is still an ugly special case for the ure/services. Change-Id: I81c004143f201aaf38daca99819888313ee24f49 --- basic/CppunitTest_basic_scanner.mk | 2 ++ connectivity/Rdb_postgresql-sdbc.mk | 4 +--- postprocess/Rdb_services.mk | 4 +--- pyuno/Rdb_pyuno.mk | 4 +--- scripting/Rdb_scriptproviderforbeanshell.mk | 4 +--- scripting/Rdb_scriptproviderforjavascript.mk | 4 +--- solenv/gbuild/Rdb.mk | 29 +++++++++++++++++----------- ure/Rdb_ure.mk | 4 +--- 8 files changed, 26 insertions(+), 29 deletions(-) diff --git a/basic/CppunitTest_basic_scanner.mk b/basic/CppunitTest_basic_scanner.mk index ec0c928a7b66..83c040a1b7d8 100644 --- a/basic/CppunitTest_basic_scanner.mk +++ b/basic/CppunitTest_basic_scanner.mk @@ -8,6 +8,8 @@ $(eval $(call gb_CppunitTest_CppunitTest,basic_scanner)) +$(eval $(call gb_CppunitTest_use_ure,basic_scanner)) + $(eval $(call gb_CppunitTest_add_exception_objects,basic_scanner, \ basic/qa/cppunit/test_scanner \ )) diff --git a/connectivity/Rdb_postgresql-sdbc.mk b/connectivity/Rdb_postgresql-sdbc.mk index 7f58482d2a50..6162b309d6ba 100644 --- a/connectivity/Rdb_postgresql-sdbc.mk +++ b/connectivity/Rdb_postgresql-sdbc.mk @@ -7,9 +7,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Rdb_Rdb,postgresql-sdbc)) - -$(eval $(call gb_Rdb_install,postgresql-sdbc)) +$(eval $(call gb_Rdb_Rdb_install,postgresql-sdbc)) $(eval $(call gb_Rdb_add_components,postgresql-sdbc,\ connectivity/source/drivers/postgresql/postgresql-sdbc \ diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk index 00be52487c41..964f1fc9f4fc 100644 --- a/postprocess/Rdb_services.mk +++ b/postprocess/Rdb_services.mk @@ -7,9 +7,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Rdb_Rdb,services)) - -$(eval $(call gb_Rdb_install,services)) +$(eval $(call gb_Rdb_Rdb_install,services)) $(eval $(call gb_Rdb_add_components,services,\ animations/source/animcore/animcore \ diff --git a/pyuno/Rdb_pyuno.mk b/pyuno/Rdb_pyuno.mk index 71050eca6c59..c14185742044 100644 --- a/pyuno/Rdb_pyuno.mk +++ b/pyuno/Rdb_pyuno.mk @@ -7,9 +7,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Rdb_Rdb,pyuno)) - -$(eval $(call gb_Rdb_install,pyuno)) +$(eval $(call gb_Rdb_Rdb_install,pyuno)) $(eval $(call gb_Rdb_add_components,pyuno, \ pyuno/source/loader/pythonloader \ diff --git a/scripting/Rdb_scriptproviderforbeanshell.mk b/scripting/Rdb_scriptproviderforbeanshell.mk index 0a086949fa33..5781610fabee 100644 --- a/scripting/Rdb_scriptproviderforbeanshell.mk +++ b/scripting/Rdb_scriptproviderforbeanshell.mk @@ -7,9 +7,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Rdb_Rdb,scriptproviderforbeanshell)) - -$(eval $(call gb_Rdb_install,scriptproviderforbeanshell)) +$(eval $(call gb_Rdb_Rdb_install,scriptproviderforbeanshell)) $(eval $(call gb_Rdb_add_components,scriptproviderforbeanshell,\ scripting/java/ScriptProviderForBeanShell \ diff --git a/scripting/Rdb_scriptproviderforjavascript.mk b/scripting/Rdb_scriptproviderforjavascript.mk index 1ac23abc97af..5d7f56ddd1f0 100644 --- a/scripting/Rdb_scriptproviderforjavascript.mk +++ b/scripting/Rdb_scriptproviderforjavascript.mk @@ -7,9 +7,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Rdb_Rdb,scriptproviderforjavascript)) - -$(eval $(call gb_Rdb_install,scriptproviderforjavascript)) +$(eval $(call gb_Rdb_Rdb_install,scriptproviderforjavascript)) $(eval $(call gb_Rdb_add_components,scriptproviderforjavascript,\ scripting/java/ScriptProviderForJavaScript \ diff --git a/solenv/gbuild/Rdb.mk b/solenv/gbuild/Rdb.mk index 980f2c8f9821..b3dcaff109d3 100644 --- a/solenv/gbuild/Rdb.mk +++ b/solenv/gbuild/Rdb.mk @@ -8,7 +8,6 @@ # gb_Rdb__get_install_target = $(gb_INSTROOT)/$(gb_PROGRAMDIRNAME)/services/$(1).rdb -gb_Rdb__get_final_target = $(WORKDIR)/Rdb/$(1).final define gb_Rdb__command $(call gb_Helper_abbreviate_dirs,\ @@ -30,26 +29,34 @@ $(call gb_Rdb_get_target,%) :| $(call gb_ExternalExecutable_get_dependencies,xsl $(call gb_Rdb_get_clean_target,%) : $(call gb_Output_announce,$*,$(false),RDB,1) $(call gb_Helper_abbreviate_dirs,\ - rm -f $(call gb_Rdb__get_final_target,$*) $(call gb_Rdb_get_target,$*)) - -$(call gb_Rdb__get_final_target,%) : - touch $@ + rm -f $(call gb_Rdb__get_install_target,$*) $(call gb_Rdb_get_target,$*)) -define gb_Rdb_Rdb +define gb_Rdb__Rdb_impl $(call gb_Rdb_get_target,$(1)) : COMPONENTS := -$(call gb_Rdb__get_final_target,$(1)) : $(call gb_Rdb_get_target,$(1)) -$$(eval $$(call gb_Module_register_target,$(call gb_Rdb__get_final_target,$(1)),$(call gb_Rdb_get_clean_target,$(1)))) -$(call gb_Helper_make_userfriendly_targets,$(1),Rdb,$(call gb_Rdb_get_target,$(1))) +$$(eval $$(call gb_Module_register_target,$(2),$(call gb_Rdb_get_clean_target,$(1)))) +$(call gb_Helper_make_userfriendly_targets,$(1),Rdb,$(2)) endef -define gb_Rdb_install -$(call gb_Helper_install,$(call gb_Rdb__get_final_target,$(1)), \ +define gb_Rdb_Rdb +$(call gb_Rdb__Rdb_impl,$(1),$(call gb_Rdb_get_target,$(1))) + +endef + +# FIXME this needs some layer-like thing for the special case in URE +define gb_Rdb_Rdb_install +$(call gb_Rdb__Rdb_impl,$(1),$(if $(2),$(gb_INSTROOT)/$(2),$(call gb_Rdb__get_install_target,$(1)))) +$(call gb_Helper_install_final, \ $(if $(2),$(gb_INSTROOT)/$(2),$(call gb_Rdb__get_install_target,$(1))), \ $(call gb_Rdb_get_target,$(1))) endef +define gb_Rdb_install +$(error gb_Rdb_install removed use gb_Rdb_Rdb_install instead) + +endef + define gb_Rdb_add_component $(call gb_Rdb_get_target,$(1)) : $(call gb_ComponentTarget_get_target,$(2)) $(call gb_Rdb_get_target,$(1)) : COMPONENTS += $(2) diff --git a/ure/Rdb_ure.mk b/ure/Rdb_ure.mk index ba172a75dca3..7eeaf1a0dfde 100644 --- a/ure/Rdb_ure.mk +++ b/ure/Rdb_ure.mk @@ -7,9 +7,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Rdb_Rdb,ure/services)) - -$(eval $(call gb_Rdb_install,ure/services,$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb)) +$(eval $(call gb_Rdb_Rdb_install,ure/services,$(LIBO_URE_SHARE_FOLDER)/misc/services.rdb)) $(eval $(call gb_Rdb_add_components,ure/services,\ $(if $(filter IOS,$(OS)),, \ -- cgit