xref: /haiku/src/data/keyboard_layouts/Jamfile (revision a5a3b2d9a3d95cbae71eaf371708c73a1780ac0d)
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 = 	$(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES:G=keyboard-layout) ;
58SEARCH on $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES) = $(appleAluminumDir) ;
59
60# Add ThinkPad keyboard layout files to the image in a ThinkPad
61# subdirectory. The subdirectory is turned into a submenu in the Layout menu
62# of the Keymap preference app.
63local thinkpadDir
64	= [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ThinkPad ] ;
65HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES =
66	"ThinkPad (US)"
67	"ThinkPad International"
68	"ThinkPad T400s (US)"
69	"ThinkPad T400s International"
70	"ThinkPad X1 (US)"
71	"ThinkPad X1 International"
72	"ThinkPad X100e (US)"
73	"ThinkPad X100e International" ;
74HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES
75	= $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES:G=keyboard-layout) ;
76SEARCH on $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES) = $(thinkpadDir) ;
77
78
79GenerateKeyboardLayoutLocalizationHeader ;
80