Respect install_sysconfdir
authorKai Wohlfahrt <kai.wohlfahrt@gmail.com>
Mon, 13 Sep 2021 23:32:52 +0000 (00:32 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 12 Oct 2021 14:59:47 +0000 (16:59 +0200)
This was lost e11a25cadbe and c900d89faa0 while adding jinja2
templating. Breaks builds on NixOS.

(cherry picked from commit 679de141122ca30388bba6d132f8c0dddcdddd15)

src/core/meson.build
src/login/meson.build

index c66538eab1fd83136ff4e9271d4faa146eee7062..367c08502757b3a84d7bb712253791ed15c5d7b3 100644 (file)
@@ -193,7 +193,7 @@ foreach item : in_files
                 output: file,
                 command : [meson_render_jinja2, config_h, '@INPUT@'],
                 capture : true,
-                install : (dir == pkgsysconfdir and install_sysconfdir_samples) or (dir != pkgsysconfdir and dir != 'no'),
+                install : (dir == pkgsysconfdir) ? install_sysconfdir_samples : (dir != 'no'),
                 install_dir : dir)
 endforeach
 
index b637adc9a2fbc75916ce6a3e7e486ca8673e416c..da704d238fe47e95afc995441d67ceffc0445f11 100644 (file)
@@ -71,18 +71,20 @@ in_files = [
         ['70-uaccess.rules',   udevrulesdir,  enable_logind and conf.get('HAVE_ACL') == 1],
         ['71-seat.rules',      udevrulesdir,  enable_logind],
         ['73-seat-late.rules', udevrulesdir,  enable_logind],
-        ['systemd-user',       pamconfdir,    enable_logind and pamconfdir != 'no']]
+        ['systemd-user',       pamconfdir,    enable_logind]]
 
 foreach tuple : in_files
         file = tuple[0]
+        dir = tuple[1]
+        install = (dir == pkgsysconfdir) ? install_sysconfdir_samples : (dir != 'no')
         custom_target(
                 file,
                 input : file + '.in',
                 output: file,
                 command : [meson_render_jinja2, config_h, '@INPUT@'],
                 capture : true,
-                install : tuple[2],
-                install_dir : tuple[1])
+                install : tuple[2] and install,
+                install_dir : dir)
 endforeach
 
 if enable_logind