]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: add alias targets to group nss and pam modules
authorLuca Boccassi <bluca@debian.org>
Fri, 31 May 2024 20:02:31 +0000 (21:02 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 31 May 2024 21:57:24 +0000 (23:57 +0200)
Add aliases grouping these modules, so that they can be built
without knowing the SONAME version in advance. Match the install
tag names.

meson.build

index 2c37139dc8e06e6501af53c504833d3ea165ba42..ea37dda854d4b2cab12f254eaf89142675f80166 100644 (file)
@@ -2527,6 +2527,8 @@ alias_target('fuzzers', fuzzer_exes)
 
 test_dlopen = executables_by_name.get('test-dlopen')
 
+nss_targets = []
+pam_targets = []
 foreach dict : modules
         name = dict.get('name')
         is_nss = name.startswith('nss_')
@@ -2575,6 +2577,11 @@ foreach dict : modules
                 # Unfortunately shared_library insists on creating the symlink…
                 meson.add_install_script(sh, '-c', 'rm $DESTDIR@0@/lib@1@.so'.format(libdir, name),
                                          install_tag : 'nss')
+                nss_targets += lib
+        endif
+
+        if is_pam
+                pam_targets += lib
         endif
 
         if want_tests != 'false' and (is_nss or is_pam)
@@ -2587,6 +2594,14 @@ foreach dict : modules
         endif
 endforeach
 
+# We need the actual targets to build aliases
+if nss_targets.length() > 0
+        alias_target('nss', nss_targets)
+endif
+if pam_targets.length() > 0
+        alias_target('pam', pam_targets)
+endif
+
 #####################################################################
 
 ukify = custom_target(