diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/meson.build b/meson.build index dcc0fe2..8e2d91c 100644 --- a/meson.build +++ b/meson.build @@ -1,10 +1,10 @@ project('iot-contact') -cp = find_program('cp', required : true) +tar = find_program('tar', required : true) fs = import('fs') -fs.copyfile(meson.current_source_dir() / 'simple.css' / 'simple.css') +css = fs.copyfile(meson.current_source_dir() / 'simple.css' / 'simple.css') subdir('tools') subdir('fw') @@ -13,6 +13,7 @@ subdir('web') artifacts = [ index_html, + css, schematic, bom, simulation, @@ -21,15 +22,20 @@ artifacts = [ kicad_pcb, ] -foreach artifact : artifacts - custom_target( - output: [fs.name(artifact.full_path())], - command: [ - cp, - artifact.full_path(), - meson.current_build_dir(), - ], - depends: artifact, - build_by_default: true, - ) -endforeach +custom_target( + output: meson.project_name() + '.tar.zst', + command: [ + tar, + '--zstd', + '--transform=s|^fw/app/||', + '--transform=s|^fw/sim/||', + '--transform=s|^fw/||', + '--transform=s|^pcb/||', + '--transform=s|^web/||', + '--transform=s|^|' + meson.project_name() + '/|', + '-cf', '@OUTPUT@', + artifacts, + ], + depends: artifacts, + build_by_default: true, +) |