Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

86 lignes
5.1 KiB

  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
  2. build_sources = $(FILES) $(GENERATED_FILES)
  3. build_sources_embed = $(build_sources:%='$(srcdir)/%')
  4. comma__=,
  5. get_resource_name = $(firstword $(subst $(comma__), ,$1))
  6. get_culture = $(lastword $(subst ., ,$(basename $1)))
  7. is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1)))))
  8. build_resx_list = $(foreach res, $(RESOURCES), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),))
  9. build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
  10. build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
  11. build_others_list = $(build_non_culture_others_list)
  12. build_xamlg_list = $(filter %.xaml.g.cs, $(FILES))
  13. # resgen all .resx resources
  14. build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res)))
  15. build_resx_resources = $(build_resx_files:.resx=.resources)
  16. # embed resources for the main assembly
  17. build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list))
  18. build_resx_resources_embed = $(build_resx_resources_hack:%='-resource:%')
  19. build_others_files = $(foreach res, $(build_others_list),$(call get_resource_name,$(res)))
  20. build_others_resources = $(build_others_files)
  21. build_others_resources_embed = $(build_others_list:%='-resource:$(srcdir)/%')
  22. build_resources = $(build_resx_resources) $(build_others_resources)
  23. build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed)
  24. build_references_ref = $(foreach ref, $(REFERENCES), $(if $(filter -pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))
  25. build_references_ref += $(foreach ref, $(DLL_REFERENCES), -r:$(ref))
  26. build_references_ref += $(foreach ref, $(PROJECT_REFERENCES), -r:$(ref))
  27. EXTRA_DIST += $(build_sources) $(build_resx_files) $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES) $(build_culture_res_files)
  28. CLEANFILES += $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) $(build_satellite_assembly_list)
  29. DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/*
  30. pkglib_SCRIPTS = $(ASSEMBLY)
  31. bin_SCRIPTS = $(BINARIES)
  32. linuxdesktopapplicationsdir = @datadir@/applications
  33. linuxdesktopapplications_DATA = $(LINUX_DESKTOPAPPLICATIONS)
  34. programfilesdir = @libdir@/@PACKAGE@
  35. programfiles_DATA = $(PROGRAMFILES)
  36. linuxpkgconfigdir = @libdir@/pkgconfig
  37. linuxpkgconfig_DATA = $(LINUX_PKGCONFIG)
  38. # macros
  39. # $(call emit-deploy-target,deploy-variable-name)
  40. define emit-deploy-target
  41. $($1): $($1_SOURCE)
  42. mkdir -p $$(dir $($1))
  43. cp '$$<' '$$@'
  44. endef
  45. # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x)
  46. # assumes that for a wrapper foo.pc its source template is foo.pc.in
  47. # if $3 is non-empty then wrapper is marked exec
  48. define emit-deploy-wrapper
  49. $($1): $2 $(top_srcdir)/config.make
  50. mkdir -p '$$(@D)'
  51. cp '$$<' '$$@'
  52. $(if $3,chmod +x '$$@')
  53. $2: $2.in $(top_srcdir)/config.make
  54. sed -e "s,@prefix@,$(prefix)," -e "s,@PACKAGE@,$(PACKAGE)," -e "s,@expanded_libdir@,$(libdir)," -e "s,@expanded_bindir@,$(bindir)," -e "s,@expanded_datadir@,$(datadir)," < $2.in > $2
  55. endef
  56. # generating satellite assemblies
  57. culture_resources = $(foreach res, $(RESOURCES), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res)))
  58. cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res)))))
  59. culture_resource_dependencies = $(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)
  60. culture_resource_commandlines = cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)'
  61. build_satellite_assembly_list = $(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))
  62. build_culture_res_files = $(foreach res, $(culture_resources),$(call get_resource_name,$(res)))
  63. $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res))))))
  64. $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res)))))
  65. $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME):
  66. mkdir -p '$(@D)'
  67. $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*)