meson: Fix bindir usage in install script

Since the install script cannot know the correct bindir, just pass it
from Meson directly.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Quentin Glidic 2017-11-30 09:23:39 +01:00 committed by Peter Hutterer
parent 582e3c00b7
commit 0843fa8e5e
2 changed files with 6 additions and 7 deletions

View file

@ -496,7 +496,8 @@ configure_file(input : 'tools/libinput.man',
install_dir : join_paths(get_option('mandir'), 'man1')
)
meson.add_install_script('tools/install-compat-scripts.sh')
meson.add_install_script('tools/install-compat-scripts.sh',
join_paths(get_option('prefix'), get_option('bindir')))
ptraccel_debug_sources = [ 'tools/ptraccel-debug.c' ]
executable('ptraccel-debug',

View file

@ -1,9 +1,7 @@
#!/bin/sh
#
# This does not honor $bindir properly, because we cannot get to it
# here. Does anyone build to something but prefix/bin?
#
bindir="${DESTDIR}/${MESON_INSTALL_PREFIX}/bin"
mkdir -p "$bindir"
bindir="${DESTDIR}${1}"
# Do not create bindir, because if it is not there now, we have a problem
cp "${MESON_SOURCE_ROOT}/tools/libinput-list-devices.compat" "${bindir}/libinput-list-devices"
cp "${MESON_SOURCE_ROOT}/tools/libinput-debug-events.compat" "${bindir}/libinput-debug-events"