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:
Zbigniew Jędrzejewski-Szmek
2017-04-23 21:47:27 -04:00
parent 3131bfe302
commit 9cc0e6e99c
10 changed files with 18 additions and 12 deletions
+1 -1
View File
@@ -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 } }'
+1 -1
View File
@@ -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'