fdo#55290 create CLI assemblies with the right name

Change-Id: I521a8a1fc013684fde6055d7e2c32790462e64c6
This commit is contained in:
David Tardon
2012-10-22 13:55:17 +02:00
parent 39f4b3d6df
commit cbd9dddb4d
2 changed files with 28 additions and 5 deletions

View File

@@ -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

View File

@@ -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