From 38f53105323b55d0bec97575ff5e818699bd4ae2 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Mon, 25 Sep 2017 21:29:00 +0200 Subject: [PATCH] meson: provide run-gdb target --- meson.build | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 41ed242..93515f3 100644 --- a/meson.build +++ b/meson.build @@ -48,14 +48,14 @@ mconnect_src = [ 'src/crypt/certificate.vala', ] -executable('mconnect', mconnect_src, - dependencies : [glib_dep, gobject_dep, - gio_dep, gio_unix_dep, - json_glib_dep, gee_dep, - libnotify_dep, gdk_dep, - atspi_dep, gnutls_dep, - posix_dep], - install: true) +mconnect_prog = executable('mconnect', mconnect_src, + dependencies : [glib_dep, gobject_dep, + gio_dep, gio_unix_dep, + json_glib_dep, gee_dep, + libnotify_dep, gdk_dep, + atspi_dep, gnutls_dep, + posix_dep], + install: true) mconnectctl_src = 'src/mconnectctl/main.vala' executable('mconnectctl', mconnectctl_src, @@ -98,3 +98,14 @@ mconnectdatadir = join_paths(get_option('datadir'), install_data('mconnect.conf', install_dir: mconnectdatadir, install_mode: 'rw-r--r--') + +# other targets + +gdb_conf = configuration_data() +gdb_conf.set('bindir', meson.build_root()) +gdb_script = configure_file(output: 'gdb-script', + input: 'gdb-script.in', + configuration: gdb_conf) +run_target('run-gdb', + command: ['gdb', '-x', join_paths(meson.build_root(), 'gdb-script')], + depends: [mconnect_prog])