meson: make cpp invocations cross-compilation friendly
This implementation assumes that the arguments in compiler.cmd_array() don't contain any spaces. Since we are only interested in compilation on Linux, I think this is a safe assumption. Solution suggested by Nirbheek Chauhan.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
cpp -dM -include linux/input.h - </dev/null | \
|
||||
$1 -dM -include linux/input.h - </dev/null | \
|
||||
awk '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($2 != "KEY_MAX") { print $2 } }'
|
||||
|
||||
@@ -58,7 +58,7 @@ generate_keyboard_keys_list = find_program('generate-keyboard-keys-list.sh')
|
||||
keyboard_keys_list_txt = custom_target(
|
||||
'keyboard-keys-list.txt',
|
||||
output : 'keyboard-keys-list.txt',
|
||||
command : [generate_keyboard_keys_list],
|
||||
command : [generate_keyboard_keys_list, cpp],
|
||||
capture : true)
|
||||
|
||||
fname = 'keyboard-keys-from-name.gperf'
|
||||
|
||||
Reference in New Issue
Block a user