From 7cffd0d92f8b725177528894424b519992b5e894 Mon Sep 17 00:00:00 2001 From: pancake Date: Sat, 14 Oct 2023 12:49:22 +0200 Subject: [PATCH] me --- libr/bin/d/meson.build | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/libr/bin/d/meson.build b/libr/bin/d/meson.build index 1f7d0dc61a2d7..791b840360559 100644 --- a/libr/bin/d/meson.build +++ b/libr/bin/d/meson.build @@ -1,4 +1,4 @@ -sdb_files = [ +sdb_dll_files = [ 'aclui', 'activeds', 'atl', @@ -151,16 +151,12 @@ sdb_files = [ 'wsasrv' ] -sdb_files += '../symclass' - r_bin_d_sources = [] -foreach file : sdb_files +foreach file : sdb_dll_files if get_option('sdb_cgen') outfile = '@0@.c'.format(file) gen_cmd = sdb_gen_cmd_cgen - # outfile = join_paths(meson.current_source_dir(), 'dll', '@0@.sdb.txt'.format(file)) - # XXX cgen builds not working well yet else outfile = '@0@.sdb'.format(file) gen_cmd = sdb_gen_cmd @@ -179,6 +175,31 @@ foreach file : sdb_files endif endforeach +# TODO: simplify this logic +sdb_files = [ 'symclass' ] + +foreach file : sdb_files + if get_option('sdb_cgen') + outfile = '@0@.c'.format(file) + gen_cmd = sdb_gen_cmd_cgen + else + outfile = '@0@.sdb'.format(file) + gen_cmd = sdb_gen_cmd + endif + target = custom_target(outfile, + input: join_paths(meson.current_source_dir(), '@0@.sdb.txt'.format(file)), + output: outfile, + command: gen_cmd, + depends: sdb_exe, + build_by_default: true, + install: true, + install_dir: join_paths(r2_sdb, join_paths('format')) + ) + if get_option('sdb_cgen') + r_bin_d_sources += target + endif +endforeach + format_files = [ 'dex', 'macho', @@ -188,8 +209,7 @@ format_files = [ 'pe32', 'trx', 'mz', - 'zip', - 'symclass.sdb', + 'zip' ] install_data(format_files,