]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/meson.build
util: rename socket_protocol_{from,to}_name() to ip_protocol_{from,to}_name()
[thirdparty/systemd.git] / src / shared / meson.build
index f7f63a54042cae6561e193d4b03aabbb86862b3b..ea8f959129766fcbcdc2a5515df3d9982c0ab267 100644 (file)
@@ -96,15 +96,22 @@ shared_sources = files('''
         machine-image.h
         machine-pool.c
         machine-pool.h
+        main-func.h
         module-util.h
+        mount-util.c
+        mount-util.h
         nsflags.c
         nsflags.h
         os-util.c
         os-util.h
         output-mode.c
         output-mode.h
+        pager.c
+        pager.h
         path-lookup.c
         path-lookup.h
+        pretty-print.c
+        pretty-print.h
         ptyfwd.c
         ptyfwd.h
         reboot-util.c
@@ -120,8 +127,8 @@ shared_sources = files('''
         serialize.h
         sleep-config.c
         sleep-config.h
-        socket-protocol-list.c
-        socket-protocol-list.h
+        ip-protocol-list.c
+        ip-protocol-list.h
         spawn-ask-password-agent.c
         spawn-ask-password-agent.h
         spawn-polkit-agent.c
@@ -181,6 +188,45 @@ if conf.get('HAVE_KMOD') == 1
         shared_sources += files('module-util.c')
 endif
 
+generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
+ip_protocol_list_txt = custom_target(
+        'ip-protocol-list.txt',
+        output : 'ip-protocol-list.txt',
+        command : [generate_ip_protocol_list, cpp],
+        capture : true)
+
+fname = 'ip-protocol-from-name.gperf'
+gperf_file = custom_target(
+        fname,
+        input : ip_protocol_list_txt,
+        output : fname,
+        command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'],
+        capture : true)
+
+fname = 'ip-protocol-from-name.h'
+target1 = custom_target(
+        fname,
+        input : gperf_file,
+        output : fname,
+        command : [gperf,
+                   '-L', 'ANSI-C', '-t', '--ignore-case',
+                   '-N', 'lookup_ip_protocol',
+                   '-H', 'hash_ip_protocol_name',
+                   '-p', '-C',
+                   '@INPUT@'],
+        capture : true)
+
+fname = 'ip-protocol-to-name.h'
+awkscript = 'ip-protocol-to-name.awk'
+target2 = custom_target(
+        fname,
+        input : [awkscript, ip_protocol_list_txt],
+        output : fname,
+        command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
+        capture : true)
+
+shared_sources += [target1, target2]
+
 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
 
 libshared_deps = [threads,
@@ -191,6 +237,7 @@ libshared_deps = [threads,
                   libgcrypt,
                   libiptc,
                   libkmod,
+                  libmount,
                   libseccomp,
                   libselinux,
                   libidn,