diff options
author | David Tardon <dtardon@redhat.com> | 2013-04-27 12:32:21 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-04-28 16:34:23 +0200 |
commit | efd2ac98ecdd2cbf2c37efc03acdd72596031c1d (patch) | |
tree | 157ed74d0f9c7a26d3c9853a3b8e0d85eed6c5d3 /solenv/gbuild/Executable.mk | |
parent | f48a576ff2c4f2ebd20b681d0c9b8233fe674a9d (diff) |
gbuild: copy executables into $(INSTDIR)
Change-Id: I88f6327c12fa2b782aa5c82e5891006713348477
Diffstat (limited to 'solenv/gbuild/Executable.mk')
-rw-r--r-- | solenv/gbuild/Executable.mk | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk index a74e2025544a..5040e2198d24 100644 --- a/solenv/gbuild/Executable.mk +++ b/solenv/gbuild/Executable.mk @@ -31,6 +31,11 @@ # defined by platform # gb_Executable_Executable_platform +# NOTE: SDKBIN executables are already packaged in module odk +gb_Executable_LAYER_DIRS := \ + OOO:program \ + UREBIN:ure/bin + $(dir $(call gb_Executable_get_runtime_target,%)).dir : $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) @@ -47,6 +52,11 @@ $(call gb_Executable_get_clean_target,%) : $(call gb_Executable_get_runtime_target,$*) \ $(AUXTARGETS)) +gb_Executable_get_packagename = Executable/$(1) + +gb_Executable__get_dir_for_layer = $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Executable_LAYER_DIRS))) +gb_Executable__get_instdir = $(call gb_Executable__get_dir_for_layer,$(call gb_Executable_get_layer,$(1))) + define gb_Executable_Executable $(call gb_Postprocess_get_target,AllExecutables) : $(call gb_Executable_get_target,$(1)) ifeq (,$$(findstring $(1),$$(gb_Executable_KNOWN))) @@ -67,12 +77,31 @@ $(call gb_Executable_get_runtime_target,$(1)) :| $(dir $(call gb_Executable_get_ $(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2)) $(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable_Executable_platform,$(1),$(2)) + +ifneq ($(gb_RUNNABLE_INSTDIR),) +$(if $(filter $(call gb_Executable_get_layer,$(1)):%,$(gb_Executable_LAYER_DIRS)),\ + $(call gb_Executable__Executable_package,$(1),$(call gb_Executable_get_packagename,$(1)),$(2),$(notdir $(call gb_Executable_get_target,$(1)))) \ +) +endif + $$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1)))) $(call gb_Helper_make_userfriendly_targets,$(1),Executable) $(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)),$(1)) endef +# gb_Executable__Executable_package executable package linktarget filename +define gb_Executable__Executable_package +$(call gb_Package_Package,$(2),$(WORKDIR)) +$(call gb_Package_set_outdir,$(2),$(INSTDIR)) +$(call gb_Package_add_file,$(2),$(call gb_Executable__get_instdir,$(1))/$(4),$(subst $(WORKDIR)/,,$(call gb_LinkTarget_get_target,$(3)))) + +$(call gb_Executable_get_target,$(1)) :| $(call gb_Package_get_target,$(2)) +$(call gb_Package_get_target,$(2)) : $(call gb_LinkTarget_get_target,$(3)) +$(call gb_Executable_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(2)) + +endef + define gb_Executable_set_targettype_gui $(call gb_LinkTarget_get_target,Executable/$(1)$(gb_Executable_EXT)) : TARGETGUI := $(2) endef |