X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=Makefile.am;h=728b860490ff60d31aba8bcff580eb5b06876a49;hp=558aa1bf0fcb1fe0ca2c32d6083f57835e7621d1;hb=a553fd32d14739b746a05ae502b8acc38e5f9a50;hpb=51d0f1c9f6a378f3bf11179e5794dc2c13b49644 diff --git a/Makefile.am b/Makefile.am index 558aa1bf0..728b86049 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ @@ -646,6 +648,8 @@ test_rtnl_SOURCES = \ test_rtnl_LDADD = \ libsystemd-rtnl.la \ + libsystemd-bus-internal.la \ + libsystemd-id128-internal.la \ libsystemd-shared.la tests += test-rtnl @@ -659,16 +663,22 @@ 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/initreq.h \ + src/shared/securebits.h \ + src/shared/special.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 \ @@ -709,7 +719,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 \ @@ -745,7 +754,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 \ @@ -757,22 +765,17 @@ libsystemd_shared_la_SOURCES = \ src/shared/ptyfwd.c \ src/shared/ptyfwd.h \ src/shared/net-util.c \ - src/shared/net-util.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) + src/shared/net-util.h \ + src/shared/errno-list.c \ + src/shared/errno-list.h \ + src/shared/syscall-list.c \ + src/shared/syscall-list.h + +nodist_libsystemd_shared_la_SOURCES = \ + src/shared/errno-from-name.h \ + src/shared/errno-to-name.h \ + src/shared/syscall-from-name.h \ + src/shared/syscall-to-name.h # ------------------------------------------------------------------------------ noinst_LTLIBRARIES += \ @@ -789,8 +792,7 @@ libsystemd_units_la_SOURCES = \ src/shared/specifier.h libsystemd_units_la_CFLAGS = \ - $(AM_CFLAGS) \ - $(DBUS_CFLAGS) + $(AM_CFLAGS) # ------------------------------------------------------------------------------ noinst_LTLIBRARIES += \ @@ -950,6 +952,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 \ @@ -976,18 +980,12 @@ libsystemd_core_la_SOURCES = \ src/core/namespace.h \ src/core/tcpwrap.c \ src/core/tcpwrap.h \ - 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 \ src/core/switch-root.c \ src/core/killall.h \ src/core/killall.c \ - src/core/syscall-list.c \ - src/core/syscall-list.h \ src/core/audit-fd.c \ src/core/audit-fd.h \ src/core/async.c \ @@ -1001,13 +999,10 @@ endif nodist_libsystemd_core_la_SOURCES = \ src/core/load-fragment-gperf.c \ - src/core/load-fragment-gperf-nulstr.c \ - src/core/syscall-from-name.h \ - src/core/syscall-to-name.h + src/core/load-fragment-gperf-nulstr.c libsystemd_core_la_CFLAGS = \ $(AM_CFLAGS) \ - $(DBUS_CFLAGS) \ $(LIBWRAP_CFLAGS) \ $(PAM_CFLAGS) \ $(AUDIT_CFLAGS) \ @@ -1018,12 +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) \ @@ -1041,37 +1037,53 @@ CLEANFILES += \ src/core/load-fragment-gperf.gperf \ 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/shared/syscall-list.txt \ + src/shared/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/shared/syscall-from-name.h \ + src/shared/syscall-to-name.h \ + src/shared/errno-from-name.h \ + src/shared/errno-to-name.h -src/core/syscall-list.txt: Makefile +src/shared/syscall-list.txt: Makefile $(AM_V_at)$(MKDIR_P) $(dir $@) $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); if ($$2 !~ /SYSCALL_BASE/) print $$2; }' > $@ -src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile +src/shared/syscall-from-name.gperf: src/shared/syscall-list.txt Makefile $(AM_V_at)$(MKDIR_P) $(dir $@) $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@ -src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile +src/shared/syscall-from-name.h: src/shared/syscall-from-name.gperf Makefile $(AM_V_at)$(MKDIR_P) $(dir $@) $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@ -src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile +src/shared/syscall-to-name.h: src/shared/syscall-list.txt Makefile + $(AM_V_at)$(MKDIR_P) $(dir $@) + $(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 "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 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) @@ -1135,6 +1147,7 @@ tests += \ test-calendarspec \ test-strip-tab-ansi \ test-cgroup-util \ + test-cgroup-mask \ test-prioq \ test-fileio \ test-time \ @@ -1148,7 +1161,10 @@ EXTRA_DIST += \ test/sched_idle_ok.service \ test/sched_rr_bad.service \ test/sched_rr_ok.service \ - test/sched_rr_change.service + test/sched_rr_change.service \ + test/son.service \ + test/daughter.service \ + test/parent.slice EXTRA_DIST += \ src/test/test-helper.h @@ -1162,10 +1178,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) @@ -1173,10 +1185,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) @@ -1187,10 +1195,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 @@ -1217,10 +1221,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) @@ -1228,10 +1228,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) @@ -1270,10 +1266,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 \ @@ -1354,6 +1346,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 @@ -1397,10 +1401,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 \ @@ -1418,7 +1418,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 = \ @@ -1851,7 +1850,8 @@ systemd_nspawn_LDADD = \ libsystemd-bus-internal.la \ libsystemd-id128-internal.la \ libsystemd-daemon-internal.la \ - libsystemd-shared.la + libsystemd-shared.la \ + libsystemd-rtnl.la # ------------------------------------------------------------------------------ systemd_run_SOURCES = \ @@ -2034,6 +2034,7 @@ tests += \ test-bus-zero-copy \ test-bus-introspect \ test-bus-objects \ + test-bus-error \ test-event bin_PROGRAMS += \ @@ -2109,6 +2110,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 @@ -2795,9 +2805,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 @@ -3197,6 +3204,7 @@ pkgconfiglib_DATA += \ src/journal/libsystemd-journal.pc dist_catalog_DATA = \ + catalog/systemd-fr.catalog \ catalog/systemd.catalog SOCKETS_TARGET_WANTS += \ @@ -3835,7 +3843,9 @@ nodist_systemd_networkd_SOURCES = \ systemd_networkd_LDADD = \ libudev-internal.la \ - libsystemd-bus.la \ + libsystemd-daemon-internal.la \ + libsystemd-bus-internal.la \ + libsystemd-id128-internal.la \ libsystemd-rtnl.la \ libsystemd-shared.la @@ -3857,7 +3867,8 @@ test_network_SOURCES = \ test_network_LDADD = \ libudev-internal.la \ - libsystemd-bus.la \ + libsystemd-bus-internal.la \ + libsystemd-id128-internal.la \ libsystemd-rtnl.la \ libsystemd-shared.la @@ -3885,7 +3896,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 \ @@ -3902,6 +3912,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 \ @@ -4333,6 +4344,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)|' \ @@ -4706,16 +4718,13 @@ check-api-unused: defined undefined exported define generate-sym-test $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_at)echo '#include ' > $@ - $(AM_V_at)for file in $(notdir $(filter %.h, $^)); do \ - echo "#include \"$$file\""; \ - done >> $@ - $(AM_V_at)echo 'void* functions[] = {' >> $@ - $(AM_V_GEN)sed -r -n 's/^( +[a-zA-Z0-9_]+);/\1,/p' $< >> $@ - $(AM_V_at)echo '};' >> $@ - $(AM_V_at)echo 'int main(void) {' >> $@ - $(AM_V_at)echo ' unsigned i; for (i=0;i> $@ - $(AM_V_at)echo 'return 0; }' >> $@ + $(AM_V_at)printf '#include \n' > $@ + $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@ + $(AM_V_at)printf 'void* functions[] = {\n' >> $@ + $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@ + $(AM_V_at)printf '};\nint main(void) {\n' >> $@ + $(AM_V_at)printf 'unsigned i; for (i=0;i> $@ + $(AM_V_at)printf 'return 0; }\n' >> $@ endef test-libsystemd-bus-sym.c: \