SubDir HAIKU_TOP src data keymaps ; SetSubDirSupportedPlatformsBeOSCompatible ; NotFile keymap_files ; Depends files : keymap_files ; rule MkKeymapComp { local binary = $(1) ; local source = $(2) ; SEARCH on $(source) = $(SEARCH_SOURCE) ; MakeLocateArch $(binary) ; LocalDepends keymap_files : $(binary) ; Depends $(binary) : $(source) keymap ; MkKeymapComp1 $(binary) : keymap $(source) ; LocalClean clean : $(binary) ; } actions MkKeymapComp1 { $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) $(2[1]) -o "$(1)" -c "$(2[2-])" ; } rule AddKeymapAlias alias : keymap { alias = $(alias:G=keymap) ; HAIKU_KEYMAP_FILE on $(alias) = $(keymap:G=keymap) ; HAIKU_KEYMAP_ALIASES += $(alias) ; } rule GenerateKeymapLocalizationHeader keymaps { local keymapNames = $(HAIKU_KEYMAP_FILES:BSM) $(HAIKU_KEYMAP_ALIASES:BSM) ; local header = KeymapNames.h ; MakeLocateCommonPlatform $(header) ; Always $(header) ; HAIKU_KEYMAP_NAMES on $(header) = $(keymapNames) ; GenerateKeymapLocalizationHeader1 $(header) ; LocalClean clean : $(header) ; } actions GenerateKeymapLocalizationHeader1 { $(RM) $(1) for name in "$(HAIKU_KEYMAP_NAMES)" ; do echo "B_TRANSLATE_MARK_VOID(\"$name\")" >> $(1) done } local keymapFiles = [ GLOB $(SUBDIR) : *.keymap ] ; # generate the binary file for the keymap files local keymapFile ; for keymapFile in [ FGristFiles $(keymapFiles:D=) ] { local binary = $(keymapFile:BG=keymap) ; MkKeymapComp $(binary) : $(keymapFile) ; HAIKU_KEYMAP_FILES += $(binary) ; } AddKeymapAlias Finnish : Swedish ; AddKeymapAlias Croatian : Slovene ; AddKeymapAlias Brazilian : US-International ; GenerateKeymapLocalizationHeader ;