X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=Makefile.am;h=d08eea2e58eb1bb6e798aa0c6fdb5509a2c46509;hp=452de152dc42ade459126f77c5a6493b46caf28d;hb=1e1954f53386cb773e2a152748dd31c4d36aa2d8;hpb=43f9cc65c2caa679019c3cfbd1aff66c6c59d410 diff --git a/Makefile.am b/Makefile.am index 452de152d..d08eea2e5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -63,6 +63,9 @@ bashcompletiondir=$(sysconfdir)/bash_completion.d rpmmacrosdir=$(sysconfdir)/rpm sysvinitdir=$(SYSTEM_SYSVINIT_PATH) varlogdir=$(localstatedir)/log +systemdstatedir=$(localstatedir)/lib/systemd +catalogstatedir=$(systemdstatedir)/catalog +hwdb_bin=/etc/udev/hwdb.bin # Our own, non-special dirs pkgsysconfdir=$(sysconfdir)/systemd @@ -78,9 +81,10 @@ systemsleepdir=$(rootlibexecdir)/system-sleep systemunitdir=$(rootprefix)/lib/systemd/system systempresetdir=$(rootprefix)/lib/systemd/system-preset udevlibexecdir=$(rootprefix)/lib/udev -udevhomedir = $(udevlibexecdir) -udevrulesdir = $(udevlibexecdir)/rules.d -udevhwdbdir = $(udevlibexecdir)/hwdb.d +udevhomedir=$(udevlibexecdir) +udevrulesdir=$(udevlibexecdir)/rules.d +udevhwdbdir=$(udevlibexecdir)/hwdb.d +catalogdir=$(prefix)/lib/systemd/catalog # And these are the special ones for / rootprefix=@rootprefix@ @@ -93,6 +97,7 @@ BUILT_SOURCES = INSTALL_EXEC_HOOKS = UNINSTALL_EXEC_HOOKS = INSTALL_DATA_HOOKS = +UNINSTALL_DATA_HOOKS = DISTCLEAN_LOCAL_HOOKS = pkginclude_HEADERS = noinst_LTLIBRARIES = @@ -125,6 +130,8 @@ AM_CPPFLAGS = \ -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \ -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \ -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \ + -DCATALOG_PATH=\"$(catalogstatedir)\" \ + -DHWDB_BIN=\"$(hwdb_bin)\" \ -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \ -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \ -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \ @@ -798,6 +805,8 @@ libsystemd_shared_la_SOURCES = \ src/shared/spawn-ask-password-agent.h \ src/shared/specifier.c \ src/shared/specifier.h \ + src/shared/replace-var.c \ + src/shared/replace-var.h \ src/shared/spawn-polkit-agent.c \ src/shared/spawn-polkit-agent.h \ src/shared/hwclock.c \ @@ -1182,7 +1191,9 @@ noinst_PROGRAMS += \ test-log \ test-unit-file \ test-date \ - test-sleep + test-sleep \ + test-replace-var \ + test-sched-prio TESTS += \ test-job-type \ @@ -1191,7 +1202,16 @@ TESTS += \ test-unit-name \ test-unit-file \ test-date \ - test-sleep + test-sleep \ + test-replace-var \ + test-sched-prio + +EXTRA_DIST += \ + test/sched_idle_bad.service \ + test/sched_idle_ok.service \ + test/sched_rr_bad.service \ + test/sched_rr_ok.service \ + test/sched_rr_change.service test_engine_SOURCES = \ src/test/test-engine.c @@ -1244,6 +1264,10 @@ 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 @@ -1265,6 +1289,12 @@ test_sleep_SOURCES = \ test_sleep_LDADD = \ libsystemd-core.la +test_replace_var_SOURCES = \ + src/test/test-replace-var.c + +test_replace_var_LDADD = \ + libsystemd-shared.la + test_daemon_SOURCES = \ src/test/test-daemon.c @@ -1309,6 +1339,18 @@ test_watchdog_SOURCES = \ test_watchdog_LDADD = \ libsystemd-shared.la +test_sched_prio_SOURCES = \ + src/test/test-sched-prio.c + +test_sched_prio_CFLAGS = \ + $(AM_CFLAGS) \ + $(DBUS_CFLAGS) \ + -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)" + +test_sched_prio_LDADD = \ + libsystemd-core.la \ + libsystemd-daemon.la + # ------------------------------------------------------------------------------ systemd_initctl_SOURCES = \ src/initctl/initctl.c @@ -1445,7 +1487,7 @@ systemd_detect_virt_LDADD = \ libsystemd-shared.la systemd-detect-virt-install-hook: - $(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt ||: + -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt INSTALL_EXEC_HOOKS += \ systemd-detect-virt-install-hook @@ -1857,7 +1899,6 @@ libudev_core_la_SOURCES = \ src/udev/udev-rules.c \ src/udev/udev-ctrl.c \ src/udev/udev-builtin.c \ - src/udev/udev-builtin-blkid.c \ src/udev/udev-builtin-btrfs.c \ src/udev/udev-builtin-firmware.c \ src/udev/udev-builtin-hwdb.c \ @@ -1884,6 +1925,11 @@ libudev_core_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DFIRMWARE_PATH="$(FIRMWARE_PATH)" +if HAVE_BLKID +libudev_core_la_SOURCES += \ + src/udev/udev-builtin-blkid.c +endif + if HAVE_ACL libudev_core_la_SOURCES += \ src/udev/udev-builtin-uaccess.c \ @@ -1915,6 +1961,17 @@ udevadm_LDADD = \ libudev-core.la \ libsystemd-shared.la +# Update hwdb on installation. Do not bother if installing +# in DESTDIR, since this is likely for packaging purposes. +hwdb-update-hook: + -test -n "$(DESTDIR)" || $(bindir)/udevadm hwdb --update + +INSTALL_DATA_HOOKS += \ + hwdb-update-hook + +hwdb-remove-hook: + -test -n "$(DESTDIR)" || rm -f $(HWDB_BIN) + # ------------------------------------------------------------------------------ TESTS += \ test/udev-test.pl \ @@ -2422,42 +2479,12 @@ EXTRA_DIST += \ # ------------------------------------------------------------------------------ systemd_journald_SOURCES = \ src/journal/journald.c \ - src/journal/journald.h \ - src/journal/journald-kmsg.c \ - src/journal/journald-kmsg.h \ - src/journal/journald-syslog.c \ - src/journal/journald-syslog.h \ - src/journal/journald-stream.c \ - src/journal/journald-stream.h \ - src/journal/journald-console.c \ - src/journal/journald-console.h \ - src/journal/journald-native.c \ - src/journal/journald-native.h \ - src/journal/journald-rate-limit.c \ - src/journal/journald-rate-limit.h \ - src/journal/journal-internal.h - -nodist_systemd_journald_SOURCES = \ - src/journal/journald-gperf.c + src/journal/journald-server.h systemd_journald_LDADD = \ - libsystemd-label.la \ - libsystemd-shared.la \ - libsystemd-audit.la \ - libsystemd-daemon.la \ - libsystemd-id128-internal.la \ libsystemd-journal-internal.la \ - libudev.la - -if ENABLE_LOGIND -systemd_journald_LDADD += \ - libsystemd-login-internal.la -endif - -if HAVE_ACL -systemd_journald_LDADD += \ - libsystemd-acl.la -endif + libsystemd-shared.la \ + libsystemd-id128-internal.la systemd_cat_SOURCES = \ src/journal/cat.c @@ -2514,12 +2541,11 @@ test_journal_send_LDADD = \ libsystemd-id128-internal.la test_journal_syslog_SOURCES = \ - src/journal/test-journal-syslog.c \ - src/journal/journald-syslog.c + src/journal/test-journal-syslog.c test_journal_syslog_LDADD = \ - libsystemd-shared.la \ libsystemd-journal-internal.la \ + libsystemd-shared.la \ libsystemd-id128-internal.la test_journal_match_SOURCES = \ @@ -2561,6 +2587,15 @@ test_mmap_cache_LDADD = \ libsystemd-shared.la \ libsystemd-journal-internal.la +test_catalog_SOURCES = \ + src/journal/test-catalog.c + +test_catalog_LDADD = \ + libsystemd-shared.la \ + libsystemd-label.la \ + libsystemd-journal-internal.la \ + libsystemd-id128-internal.la + libsystemd_journal_la_SOURCES = \ src/journal/sd-journal.c \ src/systemd/sd-journal.h \ @@ -2575,6 +2610,8 @@ libsystemd_journal_la_SOURCES = \ src/journal/journal-send.c \ src/journal/journal-def.h \ src/journal/compress.h \ + src/journal/catalog.c \ + src/journal/catalog.h \ src/journal/mmap-cache.c \ src/journal/mmap-cache.h @@ -2590,15 +2627,50 @@ libsystemd_journal_la_LDFLAGS = \ libsystemd_journal_la_LIBADD = \ libsystemd-shared.la \ + libsystemd-label.la \ libsystemd-id128-internal.la libsystemd_journal_internal_la_SOURCES = \ - $(libsystemd_journal_la_SOURCES) + $(libsystemd_journal_la_SOURCES) \ + src/journal/journald-kmsg.c \ + src/journal/journald-kmsg.h \ + src/journal/journald-syslog.c \ + src/journal/journald-syslog.h \ + src/journal/journald-stream.c \ + src/journal/journald-stream.h \ + src/journal/journald-server.c \ + src/journal/journald-server.h \ + src/journal/journald-console.c \ + src/journal/journald-console.h \ + src/journal/journald-native.c \ + src/journal/journald-native.h \ + src/journal/journald-rate-limit.c \ + src/journal/journald-rate-limit.h \ + src/journal/journal-internal.h libsystemd_journal_internal_la_CFLAGS = \ $(AM_CFLAGS) -libsystemd_journal_internal_la_LIBADD = +libsystemd_journal_internal_la_LIBADD = \ + libsystemd-label.la \ + libsystemd-audit.la \ + libsystemd-daemon.la \ + libudev.la \ + libsystemd-shared.la \ + libsystemd-label.la + +nodist_libsystemd_journal_internal_la_SOURCES = \ + src/journal/journald-gperf.c + +if ENABLE_LOGIND +libsystemd_journal_internal_la_LIBADD += \ + libsystemd-login-internal.la +endif + +if HAVE_ACL +libsystemd_journal_internal_la_LIBADD += \ + libsystemd-acl.la +endif if HAVE_XZ libsystemd_journal_la_SOURCES += \ @@ -2659,6 +2731,20 @@ libsystemd-journal-uninstall-hook: UNINSTALL_EXEC_HOOKS += \ libsystemd-journal-uninstall-hook +# Update catalog on installation. Do not bother if installing +# in DESTDIR, since this is likely for packaging purposes. +catalog-update-hook: + -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog + +INSTALL_DATA_HOOKS += \ + catalog-update-hook + +catalog-remove-hook: + -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database + +UNINSTALL_DATA_HOOKS += \ + catalog-remove-hook + noinst_PROGRAMS += \ test-journal \ test-journal-send \ @@ -2667,7 +2753,8 @@ noinst_PROGRAMS += \ test-journal-enum \ test-journal-stream \ test-journal-verify \ - test-mmap-cache + test-mmap-cache \ + test-catalog TESTS += \ test-journal \ @@ -2711,6 +2798,9 @@ dist_pkgsysconf_DATA += \ pkgconfiglib_DATA += \ src/journal/libsystemd-journal.pc +dist_catalog_DATA = \ + catalog/systemd.catalog + journal-install-data-hook: $(MKDIR_P) -m 0755 \ $(DESTDIR)$(systemunitdir)/sockets.target.wants \ @@ -3521,7 +3611,7 @@ polkitpolicy_files += \ logind-install-data-hook: $(MKDIR_P) -m 0755 \ $(DESTDIR)$(systemunitdir)/multi-user.target.wants \ - $(DESTDIR)$(localstatedir)/lib/systemd + $(DESTDIR)$(systemdstatedir) ( cd $(DESTDIR)$(systemunitdir) && \ rm -f dbus-org.freedesktop.login1.service && \ $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service) @@ -3675,6 +3765,11 @@ SED_PROCESS = \ -e 's,@userunitdir\@,$(userunitdir),g' \ -e 's,@systempresetdir\@,$(systempresetdir),g' \ -e 's,@userpresetdir\@,$(userpresetdir),g' \ + -e 's,@udevhwdbdir\@,$(udevhwdbdir),g' \ + -e 's,@udevrulesdir\@,$(udevrulesdir),g' \ + -e 's,@catalogdir\@,$(catalogdir),g' \ + -e 's,@tmpfilesdir\@,$(tmpfilesdir),g' \ + -e 's,@sysctldir\@,$(sysctldir),g' \ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \ @@ -3981,7 +4076,7 @@ endif install-exec-hook: $(INSTALL_EXEC_HOOKS) -uninstall-hook: $(UNINSTALL_EXEC_HOOKS) +uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS) install-data-hook: systemd-install-data-hook $(INSTALL_DATA_HOOKS)