diff options
-rw-r--r-- | Repository.mk | 2 | ||||
-rw-r--r-- | cli_ure/CliNativeLibrary_cli_cppuhelper.mk | 12 | ||||
-rw-r--r-- | solenv/gbuild/CliNativeLibrary.mk | 103 | ||||
-rw-r--r-- | solenv/gbuild/TargetLocations.mk | 9 |
4 files changed, 46 insertions, 80 deletions
diff --git a/Repository.mk b/Repository.mk index 99941add5169..c957433b23bc 100644 --- a/Repository.mk +++ b/Repository.mk @@ -494,7 +494,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \ xmlreader \ )) -# FIXME fdo#69601 +# this is NONE even though it is actually in URE because it is CliNativeLibrary $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \ $(if $(filter MSC,$(COM)),cli_cppuhelper) \ )) diff --git a/cli_ure/CliNativeLibrary_cli_cppuhelper.mk b/cli_ure/CliNativeLibrary_cli_cppuhelper.mk index f9889dccbca1..5bc4f45e8b0a 100644 --- a/cli_ure/CliNativeLibrary_cli_cppuhelper.mk +++ b/cli_ure/CliNativeLibrary_cli_cppuhelper.mk @@ -9,17 +9,17 @@ include $(SRCDIR)/cli_ure/version/version.txt -$(eval $(call gb_CliNativeLibrary_CliNativeLibrary,assembly/cli_cppuhelper)) +$(eval $(call gb_CliNativeLibrary_CliNativeLibrary,cli_cppuhelper)) -$(eval $(call gb_CliNativeLibrary_wrap_library,assembly/cli_cppuhelper,cli_cppuhelper)) +$(eval $(call gb_CliNativeLibrary_wrap_library,cli_cppuhelper,cli_cppuhelper)) -$(eval $(call gb_CliNativeLibrary_set_configfile,assembly/cli_cppuhelper,cli_ure/source/native/cli_cppuhelper_config)) +$(eval $(call gb_CliNativeLibrary_set_configfile,cli_cppuhelper,cli_ure/source/native/cli_cppuhelper_config)) -$(eval $(call gb_CliNativeLibrary_set_keyfile,assembly/cli_cppuhelper,$(SRCDIR)/cli_ure/source/cliuno.snk)) +$(eval $(call gb_CliNativeLibrary_set_keyfile,cli_cppuhelper,$(SRCDIR)/cli_ure/source/cliuno.snk)) -$(eval $(call gb_CliNativeLibrary_set_policy,assembly/cli_cppuhelper,$(CLI_CPPUHELPER_POLICY_ASSEMBLY),$(CLI_CPPUHELPER_POLICY_VERSION))) +$(eval $(call gb_CliNativeLibrary_set_policy,cli_cppuhelper,$(CLI_CPPUHELPER_POLICY_ASSEMBLY),$(CLI_CPPUHELPER_POLICY_VERSION))) -$(eval $(call gb_CliNativeLibrary_use_assemblies,assembly/cli_cppuhelper,\ +$(eval $(call gb_CliNativeLibrary_use_assemblies,cli_cppuhelper,\ cli_ure \ cli_uretypes \ )) diff --git a/solenv/gbuild/CliNativeLibrary.mk b/solenv/gbuild/CliNativeLibrary.mk index b014a18b011b..84c19c1e8473 100644 --- a/solenv/gbuild/CliNativeLibrary.mk +++ b/solenv/gbuild/CliNativeLibrary.mk @@ -7,14 +7,15 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -# CliNativeLibraryTarget class +# CliNativeLibrary class -gb_CliNativeLibraryTarget_EXT := $(gb_CliAssembly_POLICYEXT) +gb_CliNativeLibrary_PLATFORM_DEFAULT := x86 +gb_CliNativeLibrary_EXT := $(gb_CliAssembly_POLICYEXT) -gb_CliNativeLibraryTarget__get_library = $(call gb_CliAssembly_get_dll,$(1)) +gb_CliNativeLibrary__get_library = $(call gb_CliAssembly_get_dll,$(1)) -define gb_CliNativeLibraryTarget__command -$(call gb_Output_announce,$(1),$(true),SN ,4) +define gb_CliNativeLibrary__command +$(call gb_Output_announce,$(2),$(true),SN ,4) $(call gb_Helper_abbreviate_dirs,\ $(GNUCOPY) $(CLI_NATIVE_LIBRARY) $(1).tmp && \ sn -R $(1).tmp $(CLI_NATIVE_KEYFILE) && \ @@ -22,86 +23,43 @@ $(call gb_Helper_abbreviate_dirs,\ ) endef -$(dir $(call gb_CliNativeLibraryTarget_get_target,%)).dir : - $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) - -$(dir $(call gb_CliNativeLibraryTarget_get_target,%))%/.dir : - $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) - -$(call gb_CliNativeLibraryTarget_get_target,%) : - $(call gb_CliNativeLibraryTarget__command,$@,$*,$<) +$(call gb_CliNativeLibrary_get_preparation_target,%) : + mkdir -p $(dir $@) && touch $@ -$(call gb_CliNativeLibraryTarget_get_external_target,%) : - touch $@ - -.PHONY : $(call gb_CliNativeLibraryTarget_get_clean_target,%) -$(call gb_CliNativeLibraryTarget_get_clean_target,%) : +.PHONY : $(call gb_CliNativeLibrary_get_clean_target,%) +$(call gb_CliNativeLibrary_get_clean_target,%) : $(call gb_Output_announce,$*,$(false),SN ,4) $(call gb_Helper_abbreviate_dirs,\ - rm -rf $(call gb_CliNativeLibraryTarget_get_target,$*) \ - $(call gb_CliNativeLibraryTarget_get_external_target,$*) \ + rm -rf $(call gb_CliNativeLibrary_get_target,$*) \ + $(call gb_CliNativeLibrary_get_preparation_target,$*) \ ) -define gb_CliNativeLibraryTarget_CliNativeLibraryTarget -$(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_ASSEMBLIES := $(gb_Helper_MISCDUMMY) -$(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_KEYFILE := -$(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_LIBRARY := - -$(call gb_CliNativeLibraryTarget_get_external_target,$(1)) :| $(dir $(call gb_CliNativeLibraryTarget_get_target,$(1))).dir -$(call gb_CliNativeLibraryTarget_get_target,$(1)) :| $(dir $(call gb_CliNativeLibraryTarget_get_target,$(1))).dir - -endef - -define gb_CliNativeLibraryTarget_wrap_library -$(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_LIBRARY := $(call gb_CliNativeLibraryTarget__get_library,$(2)) -$(call gb_CliNativeLibraryTarget_get_target,$(1)) : $(call gb_Library_get_target,$(2)) -$(call gb_Library_get_headers_target,$(2)) : $(call gb_CliNativeLibraryTarget_get_external_target,$(1)) - -endef - -define gb_CliNativeLibraryTarget_set_keyfile -$(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_KEYFILE := $(2) -$(call gb_CliNativeLibraryTarget_get_target,$(1)) : $(2) - -endef - -define gb_CliNativeLibraryTarget_use_assembly -$(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_ASSEMBLIES += $(call gb_CliLibrary_get_target,$(2)) -$(call gb_CliNativeLibraryTarget_get_external_target,$(1)) : $(call gb_CliLibrary_get_target,$(2)) - -endef - -define gb_CliNativeLibraryTarget_use_assemblies -$(foreach assembly,$(2),$(call gb_CliNativeLibraryTarget_use_assembly,$(1),$(assembly))) - -endef - -# CliNativeLibrary class - -gb_CliNativeLibrary_PLATFORM_DEFAULT := x86 -gb_CliNativeLibrary_EXT := $(gb_CliNativeLibraryTarget_EXT) # Create a CLI library for a native library # # CliNativeLibrary target define gb_CliNativeLibrary_CliNativeLibrary -$(call gb_CliNativeLibraryTarget_CliNativeLibraryTarget,$(1)) $(call gb_CliAssembly_CliAssembly,$(1)) -$(call gb_CliNativeLibraryTarget_set_keyfile,$(1),$(gb_CliAssembly_KEYFILE_DEFAULT)) +$(call gb_CliNativeLibrary_get_target,$(1)) : CLI_NATIVE_ASSEMBLIES := $(gb_Helper_MISCDUMMY) +$(call gb_CliNativeLibrary_get_target,$(1)) : CLI_NATIVE_KEYFILE := +$(call gb_CliNativeLibrary_get_target,$(1)) : CLI_NATIVE_LIBRARY := + + +$(call gb_CliNativeLibrary_set_keyfile,$(1),$(gb_CliAssembly_KEYFILE_DEFAULT)) $(call gb_CliAssembly_set_platform,$(1),$(gb_CliNativeLibrary_PLATFORM_DEFAULT)) -$(call gb_CliNativeLibrary_get_target,$(1)) : $(call gb_CliNativeLibraryTarget_get_target,$(1)) $(call gb_CliNativeLibrary_get_target,$(1)) :| $(call gb_CliAssembly_get_target,$(1)) $(call gb_CliNativeLibrary_get_target,$(1)) :| $(dir $(call gb_CliNativeLibrary_get_target,$(1))).dir -$(call gb_CliNativeLibrary_get_clean_target,$(1)) : $(call gb_CliNativeLibraryTarget_get_clean_target,$(1)) $(call gb_CliNativeLibrary_get_clean_target,$(1)) : $(call gb_CliAssembly_get_clean_target,$(1)) -$(call gb_Deliver_add_deliverable,$(call gb_CliNativeLibrary_get_target,$(1)),$(call gb_CliNativeLibraryTarget_get_target,$(1)),$(1)) - $$(eval $$(call gb_Module_register_target,$(call gb_CliNativeLibrary_get_target,$(1)),$(call gb_CliNativeLibrary_get_clean_target,$(1)))) $(call gb_Helper_make_userfriendly_targets,$(1),CliNativeLibrary) +$(call gb_CliNativeLibrary_get_target,$(1)) : + $$(call gb_CliNativeLibrary__command,$$@,$(1)) + + endef define gb_CliNativeLibrary_set_configfile @@ -110,8 +68,9 @@ $(call gb_CliAssembly_set_configfile,$(1),$(2)) endef define gb_CliNativeLibrary_set_keyfile -$(call gb_CliNativeLibraryTarget_set_keyfile,$(1),$(2)) $(call gb_CliAssembly_set_keyfile,$(1),$(2)) +$(call gb_CliNativeLibrary_get_target,$(1)) : CLI_NATIVE_KEYFILE := $(2) +$(call gb_CliNativeLibrary_get_target,$(1)) : $(2) endef @@ -126,17 +85,25 @@ $(call gb_CliAssembly_set_policy,$(1),$(2),$(3)) endef define gb_CliNativeLibrary_wrap_library -$(call gb_CliNativeLibraryTarget_wrap_library,$(1),$(2)) +$(call gb_CliNativeLibrary_get_target,$(1)) : \ + CLI_NATIVE_LIBRARY := $(call gb_CliNativeLibrary__get_library,$(2)) +$(call gb_CliNativeLibrary_get_target,$(1)) : \ + $(call gb_Library_get_target,$(2)) +$(call gb_Library_get_headers_target,$(2)) : \ + $(call gb_CliNativeLibrary_get_preparation_target,$(1)) endef define gb_CliNativeLibrary_use_assembly -$(call gb_CliNativeLibraryTarget_use_assembly,$(1),$(2)) +$(call gb_CliNativeLibrary_get_target,$(1)) : \ + CLI_NATIVE_ASSEMBLIES += $(call gb_CliLibrary_get_target,$(2)) +$(call gb_CliNativeLibrary_get_preparation_target,$(1)) : \ + $(call gb_CliLibrary_get_target,$(2)) endef define gb_CliNativeLibrary_use_assemblies -$(call gb_CliNativeLibraryTarget_use_assemblies,$(1),$(2)) +$(foreach assembly,$(2),$(call gb_CliNativeLibrary_use_assembly,$(1),$(assembly))) endef diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 1340593391da..878d747fa939 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -19,8 +19,9 @@ # outdir target pattern +# thoese are hard-coded to URE for now since there are so few of them... gb_CliLibrary_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliLibrary_EXT) -gb_CliNativeLibrary_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliNativeLibrary_EXT) +gb_CliNativeLibrary_get_target = $(INSTROOT)/$(LIBO_URE_LIB_FOLDER)/$(1)$(gb_CliNativeLibrary_EXT) gb_CliUnoApi_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliUnoApi_EXT) gb_PackagePart_get_destinations = \ $(INSTDIR) \ @@ -69,8 +70,7 @@ gb_CliAssemblyTarget_get_target = $(WORKDIR)/CliAssemblyTarget/$(1).done gb_CliAssemblyTarget_get_assembly_target = $(WORKDIR)/CliAssemblyTarget/$(1)$(gb_CliAssemblyTarget_POLICYEXT) gb_CliConfigTarget_get_target = $(WORKDIR)/CliConfigTarget/$(1).config gb_CliLibraryTarget_get_target = $(WORKDIR)/CliLibraryTarget/$(1)$(gb_CliLibraryTarget_EXT) -gb_CliNativeLibraryTarget_get_external_target = $(WORKDIR)/CliNativeLibraryTarget/$(1).external -gb_CliNativeLibraryTarget_get_target = $(WORKDIR)/CliNativeLibraryTarget/$(1)$(gb_CliNativeLibraryTarget_EXT) +gb_CliNativeLibrary_get_preparation_target = $(WORKDIR)/CliNativeLibraryTarget/$(1).prepare gb_CliUnoApiTarget_get_target = $(WORKDIR)/CliUnoApiTarget/$(1)$(gb_CliUnoApiTarget_EXT) gb_ComponentTarget_get_target = $(WORKDIR)/ComponentTarget/$(1).component gb_ComponentTarget_get_target_for_build = $(WORKDIR_FOR_BUILD)/ComponentTarget/$(1).component @@ -253,7 +253,7 @@ $(eval $(call gb_Helper_make_clean_targets,\ CliAssemblyTarget \ CliConfigTarget \ CliLibraryTarget \ - CliNativeLibraryTarget \ + CliNativeLibrary \ CliUnoApiTarget \ ComponentTarget \ CustomPackage \ @@ -328,7 +328,6 @@ $(eval $(call gb_Helper_make_clean_targets,\ $(eval $(call gb_Helper_make_outdir_clean_targets,\ CliLibrary \ - CliNativeLibrary \ CliUnoApi \ InstallScript \ )) |