summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solenv/gbuild/CliAssembly.mk30
-rw-r--r--solenv/gbuild/TargetLocations.mk3
2 files changed, 28 insertions, 5 deletions
diff --git a/solenv/gbuild/CliAssembly.mk b/solenv/gbuild/CliAssembly.mk
index 440b4084a540..13eaaa2ef8b0 100644
--- a/solenv/gbuild/CliAssembly.mk
+++ b/solenv/gbuild/CliAssembly.mk
@@ -56,11 +56,12 @@ define gb_CliAssemblyTarget__command
$(call gb_Output_announce,$(2),$(true),AL ,2)
$(call gb_Helper_abbreviate_dirs,\
al \
- -out:$(1) \
+ -out:$(CLI_ASSEMBLY_OUTFILE) \
-version:$(CLI_ASSEMBLY_VERSION) \
-keyfile:$(call gb_Helper_windows_path,$(CLI_ASSEMBLY_KEYFILE)) \
-link:$(CLI_ASSEMBLY_CONFIGFILE) \
- $(if $(CLI_ASSEMBLY_PLATFORM),-platform:$(CLI_ASSEMBLY_PLATFORM)) \
+ $(if $(CLI_ASSEMBLY_PLATFORM),-platform:$(CLI_ASSEMBLY_PLATFORM)) && \
+ touch $(1) \
)
endef
@@ -73,22 +74,29 @@ $(dir $(call gb_CliAssemblyTarget_get_target,%))%/.dir :
$(call gb_CliAssemblyTarget_get_target,%) :
$(if $(strip $(CLI_ASSEMBLY_VERSION)),,$(call gb_Output_error,assembly version not set))
$(if $(strip $(CLI_ASSEMBLY_CONFIGFILE)),,$(call gb_Output_error,assembly configuration file not set))
+ $(if $(strip $(CLI_ASSEMBLY_NAME)),,$(call gb_Output_error,assembly name not set))
$(call gb_CliAssemblyTarget__command,$@,$*,$<)
+$(call gb_CliAssemblyTarget_get_assembly_target,%) :
+ touch $@
+
.PHONY : $(call gb_CliAssemblyTarget_get_clean_target,%)
$(call gb_CliAssemblyTarget_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),AL ,2)
$(call gb_Helper_abbreviate_dirs,\
- rm -f $(call gb_CliAssemblyTarget_get_target,$*) \
+ rm -f $(call gb_CliAssemblyTarget_get_target,$*) $(CLI_ASSEMBLY_OUTFILE) \
)
# Create a CLI assembly
define gb_CliAssemblyTarget_CliAssemblyTarget
$(call gb_CliAssemblyTarget_get_target,$(1)) : CLI_ASSEMBLY_CONFIGFILE :=
$(call gb_CliAssemblyTarget_get_target,$(1)) : CLI_ASSEMBLY_KEYFILE := $(gb_CliAssemblyTarget_KEYFILE_DEFAULT)
+$(call gb_CliAssemblyTarget_get_target,$(1)) : CLI_ASSEMBLY_OUTFILE :=
$(call gb_CliAssemblyTarget_get_target,$(1)) : CLI_ASSEMBLY_PLATFORM :=
$(call gb_CliAssemblyTarget_get_target,$(1)) : CLI_ASSEMBLY_VERSION :=
+$(call gb_CliAssemblyTarget_get_clean_target,$(1)) : CLI_ASSEMBLY_OUTFILE :=
+
$(call gb_CliAssemblyTarget_get_target,$(1)) :| $(dir $(call gb_CliAssemblyTarget_get_target,$(1))).dir
endef
@@ -105,6 +113,14 @@ $(call gb_CliAssemblyTarget_get_target,$(1)) : $(2)
endef
+define gb_CliAssemblyTarget_set_name
+$(call gb_CliAssemblyTarget_get_target,$(1)) \
+$(call gb_CliAssemblyTarget_get_clean_target,$(1)) : \
+ CLI_ASSEMBLY_OUTFILE := $(call gb_CliAssemblyTarget_get_assembly_target,$(2))
+$(call gb_CliAssemblyTarget_get_assembly_target,$(2)) : $(call gb_CliAssemblyTarget_get_target,$(1))
+
+endef
+
define gb_CliAssemblyTarget_set_platform
$(call gb_CliAssemblyTarget_get_target,$(1)) : CLI_ASSEMBLY_PLATFORM := $(2)
@@ -169,9 +185,15 @@ $(call gb_CliAssemblyTarget_set_platform,$(1),$(2))
endef
+define gb_CliAssembly__set_policy
+$(call gb_Package_add_file,$(1)_assembly,bin/$(notdir $(2)),$(subst $(WORKDIR)/,,$(2)))
+
+endef
+
define gb_CliAssembly_set_policy
$(call gb_CliAssemblyTarget_set_version,$(1),$(3))
-$(call gb_Package_add_file,$(1)_assembly,bin/$(2)$(gb_CliAssembly_POLICYEXT),$(subst $(WORKDIR)/,,$(call gb_CliAssemblyTarget_get_target,$(1))))
+$(call gb_CliAssemblyTarget_set_name,$(1),$(2))
+$(call gb_CliAssembly__set_policy,$(1),$(call gb_CliAssemblyTarget_get_assembly_target,$(2)))
endef
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 514c7f361807..36ff8edfb8b2 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -83,7 +83,8 @@ gb_AsmObject_get_target = $(WORKDIR)/AsmObject/$(1).o
gb_CObject_get_target = $(WORKDIR)/CObject/$(1).o
gb_GenCObject_get_target = $(WORKDIR)/GenCObject/$(1).o
gb_CliAssembly_get_target = $(WORKDIR)/CliAssembly/$(1).done
-gb_CliAssemblyTarget_get_target = $(WORKDIR)/CliAssemblyTarget/$(1)$(gb_CliAssemblyTarget_POLICYEXT)
+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