Skip to content

Commit

Permalink
me
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Oct 14, 2023
1 parent b6db3ff commit 7cffd0d
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions libr/bin/d/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sdb_files = [
sdb_dll_files = [
'aclui',
'activeds',
'atl',
Expand Down Expand Up @@ -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
Expand All @@ -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',
Expand All @@ -188,8 +209,7 @@ format_files = [
'pe32',
'trx',
'mz',
'zip',
'symclass.sdb',
'zip'
]

install_data(format_files,
Expand Down

0 comments on commit 7cffd0d

Please sign in to comment.