posts = files('access-control.org', 'gentoo-on-gcloud.org', 'index.org') foreach post : posts html = fs.replace_suffix(post, '.html') custom_target( output: fs.name(html), input: post, command: build_command, install: true, install_dir: '/var/www' / site / 'blog', capture: true, ) endforeach