chiark / gitweb /
systemctl: shortcut log output for non-service, non-socket, non-mount, non-swap units
[elogind.git] / Makefile.am
index 496f730955f8d649b2e7204e4d8e64b2dec04220..21cac4e56f6e25b81d079d3393ef83656785ef8b 100644 (file)
@@ -20,9 +20,9 @@ ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = po
 
-LIBSYSTEMD_LOGIN_CURRENT=0
-LIBSYSTEMD_LOGIN_REVISION=6
-LIBSYSTEMD_LOGIN_AGE=0
+LIBSYSTEMD_LOGIN_CURRENT=1
+LIBSYSTEMD_LOGIN_REVISION=0
+LIBSYSTEMD_LOGIN_AGE=1
 
 LIBSYSTEMD_DAEMON_CURRENT=0
 LIBSYSTEMD_DAEMON_REVISION=0
@@ -98,7 +98,8 @@ AM_CPPFLAGS = \
        -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
        -I $(top_srcdir)/src \
        -I $(top_srcdir)/src/readahead \
-       -I $(top_srcdir)/src/login
+       -I $(top_srcdir)/src/login \
+       -I $(top_srcdir)/src/journal
 
 if TARGET_GENTOO
 AM_CPPFLAGS += \
@@ -182,16 +183,13 @@ rootlibexec_PROGRAMS = \
        systemd-cgroups-agent \
        systemd-initctl \
        systemd-update-utmp \
-       systemd-random-seed \
        systemd-shutdownd \
        systemd-shutdown \
        systemd-modules-load \
        systemd-remount-api-vfs \
        systemd-kmsg-syslogd \
        systemd-reply-password \
-       systemd-user-sessions \
        systemd-fsck \
-       systemd-quotacheck \
        systemd-timestamp \
        systemd-ac-power \
        systemd-detect-virt \
@@ -200,14 +198,6 @@ rootlibexec_PROGRAMS = \
 systemgenerator_PROGRAMS = \
        systemd-getty-generator
 
-if HAVE_LIBCRYPTSETUP
-rootlibexec_PROGRAMS += \
-       systemd-cryptsetup
-
-systemgenerator_PROGRAMS += \
-       systemd-cryptsetup-generator
-endif
-
 noinst_PROGRAMS = \
        test-engine \
        test-job-type \
@@ -279,7 +269,6 @@ dist_systemunit_DATA = \
        units/local-fs-pre.target \
        units/remote-fs.target \
        units/remote-fs-pre.target \
-       units/cryptsetup.target \
        units/network.target \
        units/nss-lookup.target \
        units/mail-transfer-agent.target \
@@ -335,11 +324,8 @@ nodist_systemunit_DATA = \
        units/systemd-remount-api-vfs.service \
        units/systemd-update-utmp-runlevel.service \
        units/systemd-update-utmp-shutdown.service \
-       units/systemd-random-seed-save.service \
-       units/systemd-random-seed-load.service \
        units/systemd-tmpfiles-setup.service \
        units/systemd-tmpfiles-clean.service \
-       units/systemd-user-sessions.service \
        units/systemd-ask-password-wall.service \
        units/systemd-ask-password-console.service \
        units/systemd-sysctl.service \
@@ -349,7 +335,6 @@ nodist_systemunit_DATA = \
        units/kexec.service \
        units/fsck@.service \
        units/fsck-root.service \
-       units/quotacheck.service \
        units/rescue.service \
        units/user@.service
 
@@ -373,11 +358,8 @@ EXTRA_DIST += \
        units/systemd-remount-api-vfs.service.in \
        units/systemd-update-utmp-runlevel.service.in \
        units/systemd-update-utmp-shutdown.service.in \
-       units/systemd-random-seed-save.service.in \
-       units/systemd-random-seed-load.service.in \
        units/systemd-tmpfiles-setup.service.in \
        units/systemd-tmpfiles-clean.service.in \
-       units/systemd-user-sessions.service.in \
        units/systemd-ask-password-wall.service.in \
        units/systemd-ask-password-console.service.in \
        units/systemd-sysctl.service.in \
@@ -388,7 +370,6 @@ EXTRA_DIST += \
        units/user/exit.service.in \
        units/fsck@.service.in \
        units/fsck-root.service.in \
-       units/quotacheck.service.in \
        units/user@.service.in \
        systemd.pc.in \
        introspect.awk \
@@ -582,7 +563,7 @@ libsystemd_core_la_LIBADD = \
        $(CAP_LIBS)
 
 # This is needed because automake is buggy in how it generates the
-# rules for C programs, but not Vala programs.  We therefore can't
+# rules for C programs, but not Vala programs. We therefore can't
 # list the .h files as dependencies if we want make dist to work.
 
 EXTRA_DIST += \
@@ -804,12 +785,6 @@ systemd_update_utmp_LDADD = \
        $(DBUS_LIBS) \
        $(AUDIT_LIBS)
 
-systemd_random_seed_SOURCES = \
-       src/random-seed.c
-
-systemd_random_seed_LDADD = \
-       libsystemd-basic.la
-
 systemd_shutdownd_SOURCES = \
        src/utmp-wtmp.c \
        src/shutdownd.c
@@ -821,12 +796,6 @@ systemd_shutdownd_LDADD = \
        libsystemd-basic.la \
        libsystemd-daemon.la
 
-dist_pkgdata_DATA = \
-       src/kbd-model-map
-
-dist_noinst_SCRIPT = \
-       src/generate-kbd-model-map
-
 systemd_shutdown_SOURCES = \
        src/mount-setup.c \
        src/umount.c \
@@ -880,12 +849,6 @@ systemd_fsck_LDADD = \
        $(UDEV_LIBS) \
        $(DBUS_LIBS)
 
-systemd_quotacheck_SOURCES = \
-       src/quotacheck.c
-
-systemd_quotacheck_LDADD = \
-       libsystemd-basic.la
-
 systemd_timestamp_SOURCES = \
        src/timestamp.c
 
@@ -909,27 +872,6 @@ systemd_detect_virt_SOURCES = \
 systemd_detect_virt_LDADD = \
        libsystemd-basic.la
 
-systemd_cryptsetup_SOURCES = \
-       src/cryptsetup.c \
-       src/ask-password-api.c
-
-systemd_cryptsetup_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(LIBCRYPTSETUP_CFLAGS) \
-       $(UDEV_CFLAGS)
-
-systemd_cryptsetup_LDADD = \
-       $(LIBCRYPTSETUP_LIBS) \
-       $(UDEV_LIBS) \
-       libsystemd-basic.la
-
-systemd_cryptsetup_generator_SOURCES = \
-       src/cryptsetup-generator.c \
-       src/unit-name.c
-
-systemd_cryptsetup_generator_LDADD = \
-       libsystemd-basic.la
-
 systemd_getty_generator_SOURCES = \
        src/getty-generator.c \
        src/unit-name.c
@@ -943,13 +885,6 @@ systemd_rc_local_generator_SOURCES = \
 systemd_rc_local_generator_LDADD = \
        libsystemd-basic.la
 
-systemd_user_sessions_SOURCES = \
-       src/user-sessions.c \
-       src/cgroup-util.c
-
-systemd_user_sessions_LDADD = \
-       libsystemd-basic.la
-
 systemd_remount_api_vfs_SOURCES = \
        src/remount-api-vfs.c \
        src/mount-setup.c \
@@ -989,7 +924,8 @@ systemctl_SOURCES = \
        src/unit-name.c \
        src/pager.c \
        src/install.c \
-       src/spawn-agent.c
+       src/spawn-agent.c \
+        src/logs-show.c
 
 systemctl_CFLAGS = \
        $(AM_CFLAGS) \
@@ -998,6 +934,7 @@ systemctl_CFLAGS = \
 systemctl_LDADD = \
        libsystemd-basic.la \
        libsystemd-daemon.la \
+       libsystemd-journal.la \
        $(DBUS_LIBS)
 
 systemd_notify_SOURCES = \
@@ -1141,10 +1078,6 @@ lib_LTLIBRARIES += \
 pkgconfiglib_DATA += \
        libsystemd-daemon.pc
 
-dist_doc_DATA += \
-       src/sd-daemon.h \
-       src/sd-daemon.c
-
 MANPAGES += \
        man/sd-daemon.7 \
        man/sd_notify.3 \
@@ -1166,7 +1099,6 @@ man/sd_is_mq.3: man/sd_is_fifo.3
 man/sd_notifyf.3: man/sd_notify.3
 
 EXTRA_DIST += \
-       ${libsystemd_daemon_la_SOURCES:.c=.h} \
        libsystemd-daemon.pc.in \
        src/libsystemd-daemon.sym
 
@@ -1246,6 +1178,7 @@ systemd_journald_CFLAGS = \
 systemd_journald_LDADD = \
        libsystemd-basic.la \
        libsystemd-daemon.la \
+       libsystemd-login.la \
        $(ACL_LIBS)
 
 if HAVE_XZ
@@ -1259,14 +1192,12 @@ endif
 
 systemd_journalctl_SOURCES = \
        src/journal/journalctl.c \
-       src/journal/sd-journal.c \
-       src/journal/journal-file.c \
-       src/journal/lookup3.c \
-       src/sd-id128.c \
-       src/pager.c
+       src/pager.c \
+        src/logs-show.c
 
 systemd_journalctl_LDADD = \
-       libsystemd-basic.la
+       libsystemd-basic.la \
+        libsystemd-journal.la
 
 if HAVE_XZ
 systemd_journalctl_SOURCES += \
@@ -1497,15 +1428,101 @@ EXTRA_DIST += \
        units/systemd-readahead-replay.service.in \
        units/systemd-readahead-done.service.in
 
-dist_doc_DATA += \
-       src/readahead/sd-readahead.h \
-       src/readahead/sd-readahead.c
-
 MANPAGES += \
        man/sd_readahead.3 \
        man/sd-readahead.7
 endif
 
+# ------------------------------------------------------------------------------
+if ENABLE_QUOTACHECK
+rootlibexec_PROGRAMS += \
+       systemd-quotacheck
+
+nodist_systemunit_DATA += \
+       units/quotacheck.service
+
+EXTRA_DIST += \
+       units/quotacheck.service.in
+
+systemd_quotacheck_SOURCES = \
+       src/quotacheck.c
+
+systemd_quotacheck_LDADD = \
+       libsystemd-basic.la
+endif
+
+# ------------------------------------------------------------------------------
+if ENABLE_RANDOMSEED
+rootlibexec_PROGRAMS += \
+       systemd-random-seed
+
+nodist_systemunit_DATA += \
+       units/systemd-random-seed-save.service \
+       units/systemd-random-seed-load.service
+
+EXTRA_DIST += \
+       units/systemd-random-seed-save.service.in \
+       units/systemd-random-seed-load.service.in
+
+systemd_random_seed_SOURCES = \
+       src/random-seed.c
+
+systemd_random_seed_LDADD = \
+       libsystemd-basic.la
+
+randomseed-install-data-hook:
+       ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
+               rm -f systemd-random-seed-save.service && \
+               $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
+       ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
+               rm -f systemd-random-seed-load.service && \
+               $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service )
+
+INSTALL_DATA_HOOKS += \
+       randomseed-install-data-hook
+endif
+
+# ------------------------------------------------------------------------------
+if HAVE_LIBCRYPTSETUP
+rootlibexec_PROGRAMS += \
+       systemd-cryptsetup
+
+systemgenerator_PROGRAMS += \
+       systemd-cryptsetup-generator
+
+dist_systemunit_DATA += \
+       units/cryptsetup.target
+
+systemd_cryptsetup_SOURCES = \
+       src/cryptsetup/cryptsetup.c \
+       src/ask-password-api.c
+
+systemd_cryptsetup_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(LIBCRYPTSETUP_CFLAGS) \
+       $(UDEV_CFLAGS)
+
+systemd_cryptsetup_LDADD = \
+       $(LIBCRYPTSETUP_LIBS) \
+       $(UDEV_LIBS) \
+       libsystemd-basic.la
+
+systemd_cryptsetup_generator_SOURCES = \
+       src/cryptsetup/cryptsetup-generator.c \
+       src/unit-name.c
+
+systemd_cryptsetup_generator_LDADD = \
+       libsystemd-basic.la
+
+cryptsetup-install-data-hook:
+       ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
+               rm -f cryptsetup.target && \
+               $(LN_S) ../cryptsetup.target cryptsetup.target )
+
+INSTALL_DATA_HOOKS += \
+       cryptsetup-install-data-hook
+endif
+
 # ------------------------------------------------------------------------------
 if ENABLE_HOSTNAMED
 systemd_hostnamed_SOURCES = \
@@ -1606,6 +1623,16 @@ INSTALL_DATA_HOOKS += \
 
 EXTRA_DIST += \
        units/systemd-localed.service.in
+
+dist_pkgdata_DATA = \
+       src/locale/kbd-model-map
+
+dist_noinst_SCRIPT = \
+       src/locale/generate-kbd-model-map
+
+update-kbd-model-map:
+       src/locale/generate-kbd-model-map > src/locale/kbd-model-map
+
 endif
 
 # ------------------------------------------------------------------------------
@@ -1685,10 +1712,6 @@ systemd_logind_SOURCES += \
        src/acl-util.c
 endif
 
-systemd_logind_CPPFLAGS = \
-       $(AM_CPPFLAGS) \
-       -I $(top_srcdir)/src/login
-
 systemd_logind_CFLAGS = \
        $(AM_CFLAGS) \
        $(DBUS_CFLAGS) \
@@ -1702,8 +1725,16 @@ systemd_logind_LDADD = \
        $(UDEV_LIBS) \
        $(ACL_LIBS)
 
+systemd_user_sessions_SOURCES = \
+       src/login/user-sessions.c \
+       src/cgroup-util.c
+
+systemd_user_sessions_LDADD = \
+       libsystemd-basic.la
+
 rootlibexec_PROGRAMS += \
-       systemd-logind
+       systemd-logind \
+       systemd-user-sessions
 
 systemd_loginctl_SOURCES = \
        src/login/loginctl.c \
@@ -1800,7 +1831,8 @@ UNINSTALL_EXEC_HOOKS += \
        libsystemd-login-uninstall-hook
 
 nodist_systemunit_DATA += \
-       units/systemd-logind.service
+       units/systemd-logind.service \
+       units/systemd-user-sessions.service
 
 dist_dbussystemservice_DATA += \
        src/login/org.freedesktop.login1.service
@@ -1828,8 +1860,9 @@ logind-install-data-hook:
                rm -f dbus-org.freedesktop.login1.service && \
                $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
        ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
-               rm -f systemd-logind.service && \
-               $(LN_S) ../systemd-logind.service systemd-logind.service )
+               rm -f systemd-logind.service systemd-user-sessions.service && \
+               $(LN_S) ../systemd-logind.service systemd-logind.service && \
+               $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service )
 
 INSTALL_DATA_HOOKS += \
        logind-install-data-hook
@@ -1879,6 +1912,7 @@ MANPAGES_ALIAS += \
        man/sd_session_get_uid.3 \
        man/sd_session_get_seat.3 \
        man/sd_pid_get_owner_uid.3 \
+       man/sd_pid_get_unit.3 \
        man/sd_uid_is_on_seat.3 \
        man/sd_uid_get_sessions.3 \
        man/sd_uid_get_seats.3 \
@@ -1893,6 +1927,7 @@ man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
 man/sd_session_get_uid.3: man/sd_session_is_active.3
 man/sd_session_get_seat.3: man/sd_session_is_active.3
 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
+man/sd_pid_get_unit.3: man/sd_pid_get_session.3
 man/sd_uid_is_on_seat.3: man/sd_uid_get_state.3
 man/sd_uid_get_sessions.3: man/sd_uid_get_state.3
 man/sd_uid_get_seats.3: man/sd_uid_get_state.3
@@ -1904,6 +1939,7 @@ man/sd_get_uids.3: man/sd_get_seats.3
 EXTRA_DIST += \
        src/login/logind-gperf.gperf \
        units/systemd-logind.service.in \
+       units/systemd-user-sessions.service.in \
        src/login/libsystemd-login.pc.in \
        src/login/libsystemd-login.sym \
        src/login/logind.h \
@@ -1920,7 +1956,7 @@ endif
 
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-       $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
+       $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
                -e 's,@rootbindir\@,$(rootbindir),g' \
                -e 's,@bindir\@,$(bindir),g' \
                -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
@@ -2134,10 +2170,8 @@ systemd-install-data-hook:
                rm -f systemd-update-utmp-runlevel.service && \
                $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
        ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
-               rm -f systemd-update-utmp-shutdown.service \
-                       systemd-random-seed-save.service && \
-               $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service && \
-               $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
+               rm -f systemd-update-utmp-shutdown.service && \
+               $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service )
        ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
                rm -f systemd-remount-api-vfs.service \
                        fsck-root.service \
@@ -2171,9 +2205,8 @@ systemd-install-data-hook:
                $(LN_S) reboot.target ctrl-alt-del.target && \
                $(LN_S) getty@.service autovt@.service )
        ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
-               rm -f getty.target systemd-user-sessions.service systemd-ask-password-wall.path && \
+               rm -f getty.target systemd-ask-password-wall.path && \
                $(LN_S) ../getty.target getty.target && \
-               $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service && \
                $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path)
        ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
                rm -f getty@tty1.service && \
@@ -2189,12 +2222,10 @@ systemd-install-data-hook:
                        sys-kernel-security.mount \
                        sys-fs-fuse-connections.mount \
                        systemd-modules-load.service \
-                       systemd-random-seed-load.service \
                        systemd-tmpfiles-setup.service \
                        systemd-sysctl.service \
                        systemd-ask-password-console.path \
-                       systemd-kmsg-syslogd.service \
-                       cryptsetup.target && \
+                       systemd-kmsg-syslogd.service && \
                $(LN_S) ../dev-hugepages.mount dev-hugepages.mount && \
                $(LN_S) ../dev-mqueue.mount dev-mqueue.mount && \
                $(LN_S) ../sys-kernel-config.mount sys-kernel-config.mount && \
@@ -2202,12 +2233,10 @@ systemd-install-data-hook:
                $(LN_S) ../sys-kernel-security.mount sys-kernel-security.mount && \
                $(LN_S) ../sys-fs-fuse-connections.mount sys-fs-fuse-connections.mount && \
                $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
-               $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
                $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
                $(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
                $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path && \
-               $(LN_S) ../systemd-kmsg-syslogd.service && \
-               $(LN_S) ../cryptsetup.target cryptsetup.target )
+               $(LN_S) ../systemd-kmsg-syslogd.service )
        ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
                rm -f systemd-tmpfiles-clean.timer && \
                $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
@@ -2344,6 +2373,3 @@ upload: all distcheck
 
 git-tag:
        git tag "v$(VERSION)" -m "systemd $(VERSION)"
-
-update-kbd-model-map:
-       src/generate-kbd-model-map > src/kbd-model-map