]> 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 498b73c7504caecee9a3837da548752c290f7409..ea8f959129766fcbcdc2a5515df3d9982c0ab267 100644 (file)
@@ -8,24 +8,39 @@ shared_sources = files('''
         apparmor-util.h
         ask-password-api.c
         ask-password-api.h
+        barrier.c
+        barrier.h
         base-filesystem.c
         base-filesystem.h
+        bitmap.c
+        bitmap.h
+        blkid-util.h
         boot-timestamps.c
         boot-timestamps.h
         bootspec.c
         bootspec.h
+        bpf-program.c
+        bpf-program.h
         bus-unit-util.c
         bus-unit-util.h
         bus-util.c
         bus-util.h
+        calendarspec.c
+        calendarspec.h
         cgroup-show.c
         cgroup-show.h
         clean-ipc.c
         clean-ipc.h
+        clock-util.c
+        clock-util.h
         condition.c
         condition.h
         conf-parser.c
         conf-parser.h
+        cpu-set-util.c
+        cpu-set-util.h
+        crypt-util.c
+        crypt-util.h
         dev-setup.c
         dev-setup.h
         dissect-image.c
@@ -36,9 +51,18 @@ shared_sources = files('''
         dropin.h
         efivars.c
         efivars.h
+        enable-mempool.c
+        exec-util.c
+        exec-util.h
+        exit-status.c
+        exit-status.h
         fdset.c
         fdset.h
+        fileio-label.c
+        fileio-label.h
         firewall-util.h
+        format-table.c
+        format-table.h
         fstab-util.c
         fstab-util.h
         generator.c
@@ -51,12 +75,19 @@ shared_sources = files('''
         import-util.c
         import-util.h
         initreq.h
-        install.c
-        install.h
         install-printf.c
         install-printf.h
+        install.c
+        install.h
+        journal-importer.c
+        journal-importer.h
         journal-util.c
         journal-util.h
+        json-internal.h
+        json.c
+        json.h
+        lockfile-util.c
+        lockfile-util.h
         logs-show.c
         logs-show.h
         loop-util.c
@@ -65,20 +96,39 @@ 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
+        reboot-util.h
         resolve-util.c
         resolve-util.h
+        rlimit-util.c
+        rlimit-util.h
         seccomp-util.h
+        securebits-util.c
+        securebits-util.h
+        serialize.c
+        serialize.h
         sleep-config.c
         sleep-config.h
+        ip-protocol-list.c
+        ip-protocol-list.h
         spawn-ask-password-agent.c
         spawn-ask-password-agent.h
         spawn-polkit-agent.c
@@ -89,24 +139,32 @@ shared_sources = files('''
         switch-root.h
         sysctl-util.c
         sysctl-util.h
-        tests.c
-        tests.h
         tomoyo-util.c
         tomoyo-util.h
-        udev-util.h
         udev-util.c
+        udev-util.h
         uid-range.c
         uid-range.h
         utmp-wtmp.h
+        verbs.c
+        verbs.h
         vlan-util.c
         vlan-util.h
         volatile-util.c
         volatile-util.h
         watchdog.c
         watchdog.h
+        web-util.c
+        web-util.h
         wireguard-netlink.h
+        xml.c
+        xml.h
 '''.split())
 
+if get_option('tests') != 'false'
+        shared_sources += files('tests.c', 'tests.h')
+endif
+
 test_tables_h = files('test-tables.h')
 shared_sources += test_tables_h
 
@@ -130,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,
@@ -140,6 +237,7 @@ libshared_deps = [threads,
                   libgcrypt,
                   libiptc,
                   libkmod,
+                  libmount,
                   libseccomp,
                   libselinux,
                   libidn,