diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-04-13 02:05:33 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-04-24 03:47:28 +0200 |
commit | aa13df58741de826cf298825f66d6a7036884fc1 (patch) | |
tree | eca5b53ee8e74a5d7365e2d8573e8ad7289e29ca | |
parent | meson: fix a bunch of substitutions (diff) | |
download | systemd-aa13df58741de826cf298825f66d6a7036884fc1.tar.xz systemd-aa13df58741de826cf298825f66d6a7036884fc1.zip |
meson: support (the removal of) lines with ##
-rw-r--r-- | units/meson.build | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/units/meson.build b/units/meson.build index b051c5d3cc..62f1e33dbf 100644 --- a/units/meson.build +++ b/units/meson.build @@ -225,19 +225,23 @@ foreach tuple : in_units install = ((conds.get(0, '') == '' or conf.get(conds[0], 0) == 1) and (conds.get(1, '') == '' or conf.get(conds[1], 0) == 1)) - gen = configure_file( - input : file + '.in', - output : file, - configuration : substs) - if install - install_data(gen, - install_dir : systemunitdir) + gen1 = configure_file( + input : file + '.in', + output : file + '.tmp', + configuration : substs) + gen2 = custom_target( + file, + input : gen1, + output : file, + command : [sed, '/^## /d', '@INPUT@'], + capture : true, + install : install, + install_dir : systemunitdir) - if tuple.length() > 2 - foreach target : tuple[2].split() - meson.add_install_script('meson-add-wants.sh', systemunitdir, target, file) - endforeach - endif + if install and tuple.length() > 2 + foreach target : tuple[2].split() + meson.add_install_script('meson-add-wants.sh', systemunitdir, target, file) + endforeach endif endforeach |