1
VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT
3
build_sources = $(FILES) $(GENERATED_FILES)
4
build_sources_embed = $(build_sources:%='$(srcdir)/%')
7
get_resource_name = $(firstword $(subst $(comma__), ,$1))
8
get_culture = $(lastword $(subst ., ,$(basename $1)))
9
is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1)))))
11
build_resx_list = $(foreach res, $(RESOURCES), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),))
12
build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
13
build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
14
build_others_list = $(build_non_culture_others_list)
15
build_xamlg_list = $(filter %.xaml.g.cs, $(FILES))
17
# resgen all .resx resources
18
build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res)))
19
build_resx_resources = $(build_resx_files:.resx=.resources)
21
# embed resources for the main assembly
22
build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list))
23
build_resx_resources_embed = $(build_resx_resources_hack:%='-resource:%')
24
build_others_files = $(foreach res, $(build_others_list),$(call get_resource_name,$(res)))
25
build_others_resources = $(build_others_files)
26
build_others_resources_embed = $(build_others_list:%='-resource:$(srcdir)/%')
28
build_resources = $(build_resx_resources) $(build_others_resources)
29
build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed)
31
build_references_ref = $(foreach ref, $(REFERENCES), $(if $(filter -pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))
32
build_references_ref += $(foreach ref, $(DLL_REFERENCES), -r:$(ref))
33
build_references_ref += $(foreach ref, $(PROJECT_REFERENCES), -r:$(ref))
35
EXTRA_DIST += $(build_sources) $(build_resx_files) $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES) $(build_culture_res_files)
36
CLEANFILES += $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) $(build_satellite_assembly_list)
37
DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/*
39
pkglib_SCRIPTS = $(ASSEMBLY)
40
bin_SCRIPTS = $(BINARIES)
42
programfilesdir = @libdir@/@PACKAGE@
43
programfiles_DATA = $(PROGRAMFILES)
44
linuxpkgconfigdir = @libdir@/pkgconfig
45
linuxpkgconfig_DATA = $(LINUX_PKGCONFIG)
50
# $(call emit-deploy-target,deploy-variable-name)
51
define emit-deploy-target
53
mkdir -p $$(dir $($1))
57
# $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x)
58
# assumes that for a wrapper foo.pc its source template is foo.pc.in
59
# if $3 is non-empty then wrapper is marked exec
60
define emit-deploy-wrapper
64
$(if $3,chmod +x '$$@')
68
# generating satellite assemblies
70
culture_resources = $(foreach res, $(RESOURCES), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res)))
71
cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res)))))
72
culture_resource_dependencies = $(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)
73
culture_resource_commandlines = cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)'
74
build_satellite_assembly_list = $(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))
75
build_culture_res_files = $(foreach res, $(culture_resources),$(call get_resource_name,$(res)))
77
$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res))))))
78
$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res)))))
80
$(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME):
82
$(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*)
b'\\ No newline at end of file'