chiark / gitweb /
core: fix timestamp assignment
[elogind.git] / Makefile.am
index 04e8e323d53bf91b755dc557766ec837afa216e0..06d4fcf233951bc12013e592c101d11cd87bd321 100644 (file)
@@ -163,6 +163,7 @@ AM_CPPFLAGS = \
        -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
        -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
        -DROOTPREFIX=\"$(rootprefix)\" \
+       -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
        -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
        -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
        -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
@@ -176,6 +177,7 @@ AM_CPPFLAGS = \
        -DQUOTACHECK=\"$(QUOTACHECK)\" \
        -DKEXEC=\"$(KEXEC)\" \
        -I $(top_srcdir)/src \
+       -I $(top_builddir)/src/shared \
        -I $(top_srcdir)/src/shared \
        -I $(top_srcdir)/src/network \
        -I $(top_srcdir)/src/login \
@@ -661,16 +663,19 @@ libsystemd_shared_la_SOURCES = \
        src/shared/linux/fanotify.h \
        src/shared/linux/seccomp.h \
        src/shared/linux/seccomp-bpf.h \
+       src/shared/ioprio.h \
        src/shared/missing.h \
        src/shared/list.h \
        src/shared/macro.h \
        src/shared/def.h \
+       src/shared/sparse-endian.h \
+       src/shared/refcnt.h \
+       src/shared/udev-util.h \
+       src/shared/bus-errors.h \
        src/shared/device-nodes.c \
        src/shared/device-nodes.h \
-       src/shared/sparse-endian.h \
        src/shared/util.c \
        src/shared/util.h \
-       src/shared/udev-util.h \
        src/shared/virt.c \
        src/shared/virt.h \
        src/shared/efivars.c \
@@ -711,7 +716,6 @@ libsystemd_shared_la_SOURCES = \
        src/shared/gunicode.h \
        src/shared/pager.c \
        src/shared/pager.h \
-       src/shared/ioprio.h \
        src/shared/socket-util.c \
        src/shared/socket-util.h \
        src/shared/conf-files.c \
@@ -747,7 +751,6 @@ libsystemd_shared_la_SOURCES = \
        src/shared/acpi-fpdt.c \
        src/shared/boot-timestamps.h \
        src/shared/boot-timestamps.c \
-       src/shared/refcnt.h \
        src/shared/mkdir.c \
        src/shared/mkdir.h \
        src/shared/smack-util.c \
@@ -759,22 +762,13 @@ libsystemd_shared_la_SOURCES = \
        src/shared/ptyfwd.c \
        src/shared/ptyfwd.h \
        src/shared/net-util.c \
-       src/shared/net-util.h
+       src/shared/net-util.h \
+       src/shared/errno-list.c \
+       src/shared/errno-list.h
 
-#-------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
-       libsystemd-dbus.la
-
-libsystemd_dbus_la_SOURCES = \
-       src/shared/dbus-common.c \
-       src/shared/dbus-common.h
-
-libsystemd_dbus_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
-libsystemd_dbus_la_LIBADD = \
-       $(DBUS_LIBS)
+nodist_libsystemd_shared_la_SOURCES = \
+       src/shared/errno-from-name.h \
+       src/shared/errno-to-name.h
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -791,8 +785,7 @@ libsystemd_units_la_SOURCES = \
        src/shared/specifier.h
 
 libsystemd_units_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
+       $(AM_CFLAGS)
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -952,6 +945,8 @@ libsystemd_core_la_SOURCES = \
        src/core/dbus-kill.h \
        src/core/dbus-cgroup.c \
        src/core/dbus-cgroup.h \
+       src/core/dbus-client-track.c \
+       src/core/dbus-client-track.h \
        src/core/cgroup.c \
        src/core/cgroup.h \
        src/core/selinux-access.c \
@@ -981,7 +976,6 @@ libsystemd_core_la_SOURCES = \
        src/core/securebits.h \
        src/core/initreq.h \
        src/core/special.h \
-       src/core/bus-errors.h \
        src/core/build.h \
        src/core/sysfs-show.h \
        src/core/switch-root.h \
@@ -1009,7 +1003,6 @@ nodist_libsystemd_core_la_SOURCES = \
 
 libsystemd_core_la_CFLAGS = \
        $(AM_CFLAGS) \
-       $(DBUS_CFLAGS) \
        $(LIBWRAP_CFLAGS) \
        $(PAM_CFLAGS) \
        $(AUDIT_CFLAGS) \
@@ -1020,13 +1013,13 @@ libsystemd_core_la_LIBADD = \
        libsystemd-capability.la \
        libsystemd-units.la \
        libsystemd-label.la \
-       libsystemd-dbus.la \
        libsystemd-audit.la \
        libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libudev-internal.la \
        libsystemd-shared.la \
        libsystemd-rtnl.la \
+       libsystemd-bus-internal.la \
        $(LIBWRAP_LIBS) \
        $(PAM_LIBS) \
        $(AUDIT_LIBS) \
@@ -1045,11 +1038,15 @@ CLEANFILES += \
        src/core/load-fragment-gperf.c \
        src/core/load-fragment-gperf-nulstr.c \
        src/core/syscall-list.txt \
-       src/core/syscall-from-name.gperf
+       src/core/syscall-from-name.gperf \
+       src/shared/errno-list.txt \
+       src/shared/errno-from-name.gperf
 
 BUILT_SOURCES += \
        src/core/syscall-from-name.h \
-       src/core/syscall-to-name.h
+       src/core/syscall-to-name.h \
+       src/shared/errno-from-name.h \
+       src/shared/errno-to-name.h
 
 src/core/syscall-list.txt: Makefile
        $(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1065,16 +1062,28 @@ src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
 
 src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+
+src/shared/errno-list.txt: Makefile
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }'  > $@
+
+src/shared/errno-from-name.gperf: src/shared/errno-list.txt Makefile
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
+
+src/shared/errno-from-name.h: src/shared/errno-from-name.gperf Makefile
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
+
+src/shared/errno-to-name.h: src/shared/errno-list.txt Makefile
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
 
 # ------------------------------------------------------------------------------
 systemd_SOURCES = \
        src/core/main.c
 
-systemd_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 systemd_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1138,6 +1147,7 @@ tests += \
        test-calendarspec \
        test-strip-tab-ansi \
        test-cgroup-util \
+       test-cgroup-mask \
        test-prioq \
        test-fileio \
        test-time \
@@ -1165,10 +1175,6 @@ test_device_nodes_LDADD = \
 test_engine_SOURCES = \
        src/test/test-engine.c
 
-test_engine_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_engine_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1176,10 +1182,6 @@ test_engine_LDADD = \
 test_job_type_SOURCES = \
        src/test/test-job-type.c
 
-test_job_type_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_job_type_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1190,10 +1192,6 @@ test_ns_SOURCES = \
 test_ns_LDADD = \
        libsystemd-core.la
 
-test_ns_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_loopback_SOURCES = \
        src/test/test-loopback.c
 
@@ -1220,10 +1218,6 @@ endif
 test_unit_name_SOURCES = \
        src/test/test-unit-name.c
 
-test_unit_name_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_unit_name_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1231,10 +1225,6 @@ test_unit_name_LDADD = \
 test_unit_file_SOURCES = \
        src/test/test-unit-file.c
 
-test_unit_file_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_unit_file_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1273,10 +1263,6 @@ test_tables_SOURCES = \
        src/test/test-tables.c \
        src/shared/test-tables.h
 
-test_tables_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_tables_LDADD = \
        libsystemd-logs.la \
        libsystemd-journal-internal.la \
@@ -1357,6 +1343,18 @@ test_cgroup_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la
 
+test_cgroup_mask_SOURCES = \
+       src/test/test-cgroup-mask.c
+
+test_cgroup_mask_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS) \
+       -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)"
+
+test_cgroup_mask_LDADD = \
+       libsystemd-core.la \
+       $(RT_LIBS)
+
 test_cgroup_util_SOURCES = \
        src/test/test-cgroup-util.c
 
@@ -1400,10 +1398,6 @@ test_strxcpyx_LDADD = \
 test_install_SOURCES = \
        src/test/test-install.c
 
-test_install_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_install_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
@@ -1421,7 +1415,6 @@ test_sched_prio_SOURCES = \
 
 test_sched_prio_CFLAGS = \
        $(AM_CFLAGS) \
-       $(DBUS_CFLAGS) \
        -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)"
 
 test_sched_prio_LDADD = \
@@ -2038,6 +2031,7 @@ tests += \
        test-bus-zero-copy \
        test-bus-introspect \
        test-bus-objects \
+       test-bus-error \
        test-event
 
 bin_PROGRAMS += \
@@ -2113,6 +2107,15 @@ test_bus_objects_LDADD = \
        libsystemd-capability.la \
        $(CAP_LIBS)
 
+test_bus_error_SOURCES = \
+       src/libsystemd-bus/test-bus-error.c
+
+test_bus_error_LDADD = \
+       libsystemd-bus-internal.la \
+       libsystemd-id128-internal.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-shared.la
+
 test_bus_match_SOURCES = \
        src/libsystemd-bus/test-bus-match.c
 
@@ -2799,9 +2802,6 @@ mtd_probe_SOURCES =  \
        src/udev/mtd_probe/mtd_probe.h \
        src/udev/mtd_probe/probe_smartmedia.c
 
-mtd_probe_CPPFLAGS = \
-       $(AM_CPPFLAGS)
-
 dist_udevrules_DATA += \
        rules/75-probe_mtd.rules
 
@@ -3201,6 +3201,7 @@ pkgconfiglib_DATA += \
        src/journal/libsystemd-journal.pc
 
 dist_catalog_DATA = \
+       catalog/systemd-fr.catalog \
        catalog/systemd.catalog
 
 SOCKETS_TARGET_WANTS += \
@@ -3891,7 +3892,6 @@ systemd_logind_LDADD = \
 
 libsystemd_logind_core_la_SOURCES = \
        src/login/logind-core.c \
-       src/login/logind-dbus.c \
        src/login/logind-device.c \
        src/login/logind-device.h \
        src/login/logind-button.c \
@@ -3908,6 +3908,7 @@ libsystemd_logind_core_la_SOURCES = \
        src/login/logind-user.h \
        src/login/logind-inhibit.c \
        src/login/logind-inhibit.h \
+       src/login/logind-dbus.c \
        src/login/logind-session-dbus.c \
        src/login/logind-seat-dbus.c \
        src/login/logind-user-dbus.c \
@@ -4339,6 +4340,7 @@ substitutions = \
        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
        '|PACKAGE_URL=$(PACKAGE_URL)|' \
+       '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
        '|prefix=$(prefix)|' \
        '|exec_prefix=$(exec_prefix)|' \