1SubDir HAIKU_TOP src data keyboard_layouts ; 2 3SetSubDirSupportedPlatformsBeOSCompatible ; 4 5 6rule GenerateKeyboardLayoutLocalizationHeader 7{ 8 local header = <keyboard-layout-locale>KeyboardLayoutNames.h ; 9 MakeLocateCommonPlatform $(header) ; 10 local jamfile = [ FGristFiles Jamfile ] ; 11 SEARCH on $(jamfile) = $(SUBDIR) ; 12 Depends $(header) : $(jamfile) ; 13 GenerateKeyboardLayoutLocalizationHeader1 $(header) ; 14 LocalClean clean : $(header) ; 15} 16 17actions GenerateKeyboardLayoutLocalizationHeader1 18{ 19 $(RM) $(1) 20 echo "#undef B_TRANSLATION_CONTEXT" >> $(1) 21 echo "#define B_TRANSLATION_CONTEXT \"KeyboardLayoutNames\"" >> $(1) 22 for name in "$(HAIKU_KEYBOARD_LAYOUT_FILES)" ; do 23 echo "B_TRANSLATE_MARK_VOID(\"$name\")" >> $(1) 24 done 25 echo "B_TRANSLATE_MARK_VOID(\"Apple\ Aluminum\")" >> $(1) 26 for name in "$(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES)" ; do 27 echo "B_TRANSLATE_MARK_VOID(\"$name\")" >> $(1) 28 done 29 echo "B_TRANSLATE_MARK_VOID(\"ThinkPad\")" >> $(1) 30 for name in "$(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES)" ; do 31 echo "B_TRANSLATE_MARK_VOID(\"$name\")" >> $(1) 32 done 33} 34 35 36# Add keyboard layout files to the image. 37local keyboardLayoutsDir 38 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ] ; 39HAIKU_KEYBOARD_LAYOUT_FILES = 40 "Generic 104-key" 41 "Generic 105-key International" 42 "Kinesis Advantage" 43 "Kinesis Ergo Elan International" 44 "TypeMatrix 2030" ; 45HAIKU_KEYBOARD_LAYOUT_FILES = $(HAIKU_KEYBOARD_LAYOUT_FILES:G=keyboard-layout) ; 46SEARCH on $(HAIKU_KEYBOARD_LAYOUT_FILES) = $(keyboardLayoutsDir) ; 47 48# Add Apple Aluminum keyboard layout files to the image in an Apple Aluminum 49# subdirectory. The subdirectory is turned into a submenu in the Layout menu 50# of the Keymap preference app. 51local appleAluminumDir 52 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts 53 Apple\ Aluminum ] ; 54HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES = 55 "Apple Aluminium Extended International" 56 "Apple Aluminium International" 57 "Apple Aluminum (US)" 58 "Apple Aluminum Extended (US)" ; 59HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES 60 = $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES:G=keyboard-layout) ; 61SEARCH on $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES) = $(appleAluminumDir) ; 62 63# Add ThinkPad keyboard layout files to the image in a ThinkPad 64# subdirectory. The subdirectory is turned into a submenu in the Layout menu 65# of the Keymap preference app. 66local thinkpadDir 67 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ThinkPad ] ; 68HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES = 69 "ThinkPad (US)" 70 "ThinkPad International" 71 "ThinkPad T400s (US)" 72 "ThinkPad T400s International" 73 "ThinkPad X1 (US)" 74 "ThinkPad X1 International" 75 "ThinkPad X100e (US)" 76 "ThinkPad X100e International" ; 77HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES 78 = $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES:G=keyboard-layout) ; 79SEARCH on $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES) = $(thinkpadDir) ; 80 81 82GenerateKeyboardLayoutLocalizationHeader ; 83