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 for name in "$(HAIKU_KEYBOARD_LAYOUT_FILES)" ; do 21 echo "B_TRANSLATE_MARK_VOID(\"$name\")" >> $(1) 22 done 23 echo "B_TRANSLATE_MARK_VOID(\"Apple\ Aluminum\")" >> $(1) 24 for name in "$(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES)" ; do 25 echo "B_TRANSLATE_MARK_VOID(\"$name\")" >> $(1) 26 done 27 echo "B_TRANSLATE_MARK_VOID(\"ThinkPad\")" >> $(1) 28 for name in "$(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES)" ; do 29 echo "B_TRANSLATE_MARK_VOID(\"$name\")" >> $(1) 30 done 31} 32 33 34# Add keyboard layout files to the image. 35local keyboardLayoutsDir 36 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ] ; 37HAIKU_KEYBOARD_LAYOUT_FILES = 38 "Generic 104-key" 39 "Generic 105-key International" 40 "Kinesis Advantage" 41 "Kinesis Ergo Elan International" 42 "TypeMatrix 2030" ; 43HAIKU_KEYBOARD_LAYOUT_FILES = $(HAIKU_KEYBOARD_LAYOUT_FILES:G=keyboard-layout) ; 44SEARCH on $(HAIKU_KEYBOARD_LAYOUT_FILES) = $(keyboardLayoutsDir) ; 45 46# Add Apple Aluminum keyboard layout files to the image in an Apple Aluminum 47# subdirectory. The subdirectory is turned into a submenu in the Layout menu 48# of the Keymap preference app. 49local appleAluminumDir 50 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts 51 Apple\ Aluminum ] ; 52HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES = 53 "Apple Aluminium Extended International" 54 "Apple Aluminium International" 55 "Apple Aluminum (US)" 56 "Apple Aluminum Extended (US)" ; 57HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES 58 = $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES:G=keyboard-layout) ; 59SEARCH on $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES) = $(appleAluminumDir) ; 60 61# Add ThinkPad keyboard layout files to the image in a ThinkPad 62# subdirectory. The subdirectory is turned into a submenu in the Layout menu 63# of the Keymap preference app. 64local thinkpadDir 65 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ThinkPad ] ; 66HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES = 67 "ThinkPad (US)" 68 "ThinkPad International" 69 "ThinkPad T400s (US)" 70 "ThinkPad T400s International" 71 "ThinkPad X1 (US)" 72 "ThinkPad X1 International" 73 "ThinkPad X100e (US)" 74 "ThinkPad X100e International" ; 75HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES 76 = $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES:G=keyboard-layout) ; 77SEARCH on $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES) = $(thinkpadDir) ; 78 79 80GenerateKeyboardLayoutLocalizationHeader ; 81