summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-11 10:25:34 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-23 21:47:27 -0400
commit9cc0e6e99ca3645b87c22fecdaa9ba9965a12e4f (patch)
treed2983b55e3e36dd00095d1593b559a1effa9128d /src/udev
parent3131bfe302d3d2657576499a86827ca979846b81 (diff)
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.
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/generate-keyboard-keys-list.sh2
-rw-r--r--src/udev/meson.build2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/generate-keyboard-keys-list.sh b/src/udev/generate-keyboard-keys-list.sh
index cd6ef9c93b..91635caebc 100644
--- a/src/udev/generate-keyboard-keys-list.sh
+++ b/src/udev/generate-keyboard-keys-list.sh
@@ -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 } }'
diff --git a/src/udev/meson.build b/src/udev/meson.build
index dd8ec53cdf..fdd73046dc 100644
--- a/src/udev/meson.build
+++ b/src/udev/meson.build
@@ -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'