xref: /haiku/src/data/keyboard_layouts/Jamfile (revision 1a76488fc88584bf66b9751d7fb9b6527ac20d87)
1SubDir HAIKU_TOP src data keyboard_layouts ;
2
3
4rule GenerateKeyboardLayoutLocalizationHeader
5{
6	local header = <keyboard-layout-locale>KeyboardLayoutNames.h ;
7	MakeLocateCommonPlatform $(header) ;
8	local jamfile = [ FGristFiles Jamfile ] ;
9	SEARCH on $(jamfile) = $(SUBDIR) ;
10	Depends $(header) : $(jamfile) ;
11	GenerateKeyboardLayoutLocalizationHeader1 $(header) ;
12	LocalClean clean : $(header) ;
13}
14
15actions GenerateKeyboardLayoutLocalizationHeader1
16{
17	$(RM) $(1)
18	echo "#undef B_TRANSLATION_CONTEXT" >> $(1)
19	echo "#define B_TRANSLATION_CONTEXT \"KeyboardLayoutNames\"" >> $(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	"Fizzbook NL2"
39	"Generic 104-key"
40	"Generic 105-key International"
41	"Kinesis Advantage"
42	"Kinesis Ergo Elan International"
43	"TypeMatrix 2030"
44	"X-Bows Nature" ;
45HAIKU_KEYBOARD_LAYOUT_FILES = $(HAIKU_KEYBOARD_LAYOUT_FILES) ;
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) ;
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) ;
79SEARCH on $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES) = $(thinkpadDir) ;
80
81
82GenerateKeyboardLayoutLocalizationHeader ;
83