Since meson 0.40, meson it's able to install generated files into multiple directories. However, those installation directories are used one by one for each generated target.
It would be nice to have something like the following,
custom_target(
output,
input: output_input,
output: output,
command: cmd,
install: true,
install_dir: [dir1, dir2]
)
It would generate the output file after processing output_input file with the cmd command, and at install time, this file would be copied to dir1 and dir2.
I would rather implement this with nested lists:
output: ['foo.out', 'bar.out']
install_dir: [['/usr/share', '/opt/share'], '/usr/share']
The only reason to not do this is that every other list passed to a kwarg is flattened. Perhaps we should add a new tuple type that is explicitly for lists that should never be flattened.
Any progress? This would be useful when working with flatpaks (icons should be installed in /app and /mimetypes for desktop file/file icon usage).
@ZanderBrown No progress yet, but if you would like to work on this we can help you get started. :)
Sure why not
@jpakkane what do you think about the nested list idea, and should we have a new tuple type for lists that contain items of different types, and hence must never be flattened?
Most helpful comment
I would rather implement this with nested lists:
The only reason to not do this is that every other list passed to a kwarg is flattened. Perhaps we should add a new tuple type that is explicitly for lists that should never be flattened.