chiark / gitweb /
log: make internal log api log directly to the journal
[elogind.git] / Makefile.am
index 8bb5b9d9491dbc9fc539a3f5acd7c8c92e2f41d9..42da4fb753ca996cf70f5672b30e5dfff8e257eb 100644 (file)
@@ -56,12 +56,12 @@ usergeneratordir=$(pkglibexecdir)/user-generators
 pkgincludedir=$(includedir)/systemd
 
 # And these are the special ones for /
-rootdir=@rootdir@
-rootbindir=$(rootdir)/bin
-rootlibexecdir=$(rootdir)/lib/systemd
+rootprefix=@rootprefix@
+rootbindir=$(rootprefix)/bin
+rootlibexecdir=$(rootprefix)/lib/systemd
 systemgeneratordir=$(rootlibexecdir)/system-generators
 systemshutdowndir=$(rootlibexecdir)/system-shutdown
-systemunitdir=$(rootdir)/lib/systemd/system
+systemunitdir=$(rootprefix)/lib/systemd/system
 
 CLEANFILES =
 EXTRA_DIST =
@@ -89,6 +89,7 @@ AM_CPPFLAGS = \
        -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
        -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
        -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
+       -DROOTPREFIX=\"$(rootprefix)\" \
        -DRUNTIME_DIR=\"/run\" \
        -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
        -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
@@ -98,7 +99,9 @@ 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 \
+       -I $(top_srcdir)/src/systemd
 
 if TARGET_GENTOO
 AM_CPPFLAGS += \
@@ -178,7 +181,6 @@ bin_PROGRAMS += \
 endif
 
 rootlibexec_PROGRAMS = \
-       systemd-stdout-syslog-bridge \
        systemd-cgroups-agent \
        systemd-initctl \
        systemd-update-utmp \
@@ -186,7 +188,6 @@ rootlibexec_PROGRAMS = \
        systemd-shutdown \
        systemd-modules-load \
        systemd-remount-api-vfs \
-       systemd-kmsg-syslogd \
        systemd-reply-password \
        systemd-fsck \
        systemd-timestamp \
@@ -284,7 +285,6 @@ dist_systemunit_DATA = \
        units/sockets.target \
        units/swap.target \
        units/systemd-initctl.socket \
-       units/systemd-stdout-syslog-bridge.socket \
        units/systemd-shutdownd.socket \
        units/syslog.socket \
        units/dev-hugepages.mount \
@@ -316,9 +316,7 @@ nodist_systemunit_DATA = \
        units/serial-getty@.service \
        units/console-shell.service \
        units/systemd-initctl.service \
-       units/systemd-stdout-syslog-bridge.service \
        units/systemd-shutdownd.service \
-       units/systemd-kmsg-syslogd.service \
        units/systemd-modules-load.service \
        units/systemd-remount-api-vfs.service \
        units/systemd-update-utmp-runlevel.service \
@@ -350,9 +348,7 @@ EXTRA_DIST += \
        units/console-shell.service.m4 \
        units/rescue.service.m4 \
        units/systemd-initctl.service.in \
-       units/systemd-stdout-syslog-bridge.service.in \
        units/systemd-shutdownd.service.in \
-       units/systemd-kmsg-syslogd.service.in \
        units/systemd-modules-load.service.in \
        units/systemd-remount-api-vfs.service.in \
        units/systemd-update-utmp-runlevel.service.in \
@@ -370,7 +366,7 @@ EXTRA_DIST += \
        units/fsck@.service.in \
        units/fsck-root.service.in \
        units/user@.service.in \
-       systemd.pc.in \
+       src/systemd.pc.in \
        introspect.awk \
        src/73-seat-late.rules.in \
        src/99-systemd.rules.in \
@@ -441,7 +437,7 @@ dist_doc_DATA = \
        DISTRO_PORTING
 
 pkgconfigdata_DATA = \
-       systemd.pc
+       src/systemd.pc
 
 # First passed through sed, followed by intltool
 polkitpolicy_in_in_files = \
@@ -566,8 +562,68 @@ libsystemd_core_la_LIBADD = \
 # list the .h files as dependencies if we want make dist to work.
 
 EXTRA_DIST += \
-       ${libsystemd_basic_la_SOURCES:.c=.h} \
-       ${libsystemd_core_la_SOURCES:.c=.h} \
+       src/util.h \
+       src/virt.h \
+       src/label.h \
+       src/hashmap.h \
+       src/set.h \
+       src/strv.h \
+       src/conf-parser.h \
+       src/socket-util.h \
+       src/log.h \
+       src/ratelimit.h \
+       src/exit-status.h \
+       src/unit.h \
+       src/job.h \
+       src/manager.h \
+       src/path-lookup.h \
+       src/load-fragment.h \
+       src/service.h \
+       src/automount.h \
+       src/mount.h \
+       src/swap.h \
+       src/device.h \
+       src/target.h \
+       src/snapshot.h \
+       src/socket.h \
+       src/timer.h \
+       src/path.h \
+       src/load-dropin.h \
+       src/execute.h \
+       src/utmp-wtmp.h \
+       src/dbus.h \
+       src/dbus-manager.h \
+       src/dbus-unit.h \
+       src/dbus-job.h \
+       src/dbus-service.h \
+       src/dbus-socket.h \
+       src/dbus-timer.h \
+       src/dbus-target.h \
+       src/dbus-mount.h \
+       src/dbus-automount.h \
+       src/dbus-swap.h \
+       src/dbus-snapshot.h \
+       src/dbus-device.h \
+       src/dbus-execute.h \
+       src/dbus-path.h \
+       src/cgroup.h \
+       src/mount-setup.h \
+       src/hostname-setup.h \
+       src/selinux-setup.h \
+       src/loopback-setup.h \
+       src/kmod-setup.h \
+       src/locale-setup.h \
+       src/machine-id-setup.h \
+       src/specifier.h \
+       src/unit-name.h \
+       src/fdset.h \
+       src/namespace.h \
+       src/tcpwrap.h \
+       src/cgroup-util.h \
+       src/condition.h \
+       src/dbus-common.h \
+       src/install.h \
+       src/cgroup-attr.h \
        src/macro.h \
        src/def.h \
        src/ioprio.h \
@@ -590,7 +646,8 @@ EXTRA_DIST += \
        src/polkit.h \
        src/dbus-loop.h \
        src/spawn-agent.h \
-       src/acl-util.h
+       src/acl-util.h \
+       src/logs-show.h
 
 MANPAGES = \
        man/systemd.1 \
@@ -747,15 +804,6 @@ test_install_CFLAGS = \
 test_install_LDADD = \
        libsystemd-basic.la
 
-systemd_stdout_syslog_bridge_SOURCES = \
-       src/stdout-syslog-bridge.c \
-       src/tcpwrap.c
-
-systemd_stdout_syslog_bridge_LDADD = \
-       libsystemd-basic.la \
-       libsystemd-daemon.la \
-       $(LIBWRAP_LIBS)
-
 systemd_initctl_SOURCES = \
        src/initctl.c \
        src/dbus-common.c
@@ -904,14 +952,6 @@ systemd_cgroups_agent_LDADD = \
        libsystemd-basic.la \
        $(DBUS_LIBS)
 
-systemd_kmsg_syslogd_SOURCES = \
-       src/kmsg-syslogd.c \
-       src/fdset.c
-
-systemd_kmsg_syslogd_LDADD = \
-       libsystemd-basic.la \
-       libsystemd-daemon.la
-
 systemctl_SOURCES = \
        src/systemctl.c \
        src/utmp-wtmp.c \
@@ -923,7 +963,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) \
@@ -932,6 +973,8 @@ systemctl_CFLAGS = \
 systemctl_LDADD = \
        libsystemd-basic.la \
        libsystemd-daemon.la \
+       libsystemd-journal.la \
+       libsystemd-id128.la \
        $(DBUS_LIBS)
 
 systemd_notify_SOURCES = \
@@ -1048,7 +1091,7 @@ libsystemd_daemon_la_LDFLAGS = \
        -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon.sym
 
 pkginclude_HEADERS += \
-       src/sd-daemon.h
+       src/systemd/sd-daemon.h
 
 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
 libsystemd-daemon-install-hook:
@@ -1073,7 +1116,7 @@ lib_LTLIBRARIES += \
        libsystemd-daemon.la
 
 pkgconfiglib_DATA += \
-       libsystemd-daemon.pc
+        src/libsystemd-daemon.pc
 
 MANPAGES += \
        man/sd-daemon.7 \
@@ -1096,7 +1139,7 @@ man/sd_is_mq.3: man/sd_is_fifo.3
 man/sd_notifyf.3: man/sd_notify.3
 
 EXTRA_DIST += \
-       libsystemd-daemon.pc.in \
+       src/libsystemd-daemon.pc.in \
        src/libsystemd-daemon.sym
 
 # ------------------------------------------------------------------------------
@@ -1126,13 +1169,13 @@ noinst_PROGRAMS += \
        test-id128
 
 pkginclude_HEADERS += \
-       src/sd-id128.h
+       src/systemd/sd-id128.h
 
 lib_LTLIBRARIES += \
        libsystemd-id128.la
 
 pkgconfiglib_DATA += \
-       libsystemd-id128.pc
+       src/libsystemd-id128.pc
 
 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
 libsystemd-id128-install-hook:
@@ -1154,7 +1197,7 @@ UNINSTALL_EXEC_HOOKS += \
        libsystemd-id128-uninstall-hook
 
 EXTRA_DIST += \
-       libsystemd-id128.pc.in \
+       src/libsystemd-id128.pc.in \
        src/libsystemd-id128.sym
 
 # ------------------------------------------------------------------------------
@@ -1165,9 +1208,16 @@ systemd_journald_SOURCES = \
        src/journal/lookup3.c \
        src/journal/journal-rate-limit.c \
        src/sd-id128.c \
-       src/acl-util.c \
        src/cgroup-util.c
 
+if HAVE_ACL
+systemd_journald_SOURCES += \
+       src/acl-util.c
+endif
+
+nodist_systemd_journald_SOURCES = \
+       src/journal/journald-gperf.c
+
 systemd_journald_CFLAGS = \
        $(AM_CFLAGS) \
        $(ACL_CFLAGS)
@@ -1189,19 +1239,19 @@ 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 \
+       libsystemd-id128.la
 
 if HAVE_XZ
 systemd_journalctl_SOURCES += \
        src/journal/compress.c
 systemd_journalctl_CFLAGS = \
+       $(AM_CFLAGS) \
        $(XZ_CFLAGS)
 systemd_journalctl_LDADD += \
        $(XZ_LIBS)
@@ -1223,6 +1273,7 @@ test_journal_SOURCES += \
        src/journal/compress.c
 
 test_journal_CFLAGS = \
+       $(AM_CFLAGS) \
        $(XZ_CFLAGS)
 
 test_journal_LDADD += \
@@ -1232,13 +1283,11 @@ endif
 libsystemd_journal_la_SOURCES = \
        src/journal/sd-journal.c \
        src/journal/journal-file.c \
-       src/journal/compress.c \
        src/journal/lookup3.c \
        src/journal/journal-send.c
 
 libsystemd_journal_la_CFLAGS = \
        $(AM_CFLAGS) \
-       $(XZ_CFLAGS) \
        -fvisibility=hidden
 
 libsystemd_journal_la_LDFLAGS = \
@@ -1248,8 +1297,18 @@ libsystemd_journal_la_LDFLAGS = \
 
 libsystemd_journal_la_LIBADD = \
        libsystemd-basic.la \
-       libsystemd-id128.la \
+       libsystemd-id128.la
+
+if HAVE_XZ
+libsystemd_journal_la_SOURCES += \
+       src/journal/compress.c
+
+libsystemd_journal_la_CFLAGS += \
+       $(XZ_CFLAGS)
+
+libsystemd_journal_la_LIBADD += \
        $(XZ_LIBS)
+endif
 
 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
 libsystemd-journal-install-hook:
@@ -1274,7 +1333,8 @@ noinst_PROGRAMS += \
        test-journal
 
 pkginclude_HEADERS += \
-       src/journal/sd-journal.h
+       src/systemd/sd-journal.h \
+        src/systemd/sd-messages.h
 
 lib_LTLIBRARIES += \
        libsystemd-journal.la
@@ -1291,18 +1351,28 @@ dist_systemunit_DATA += \
 nodist_systemunit_DATA += \
        units/systemd-journald.service
 
+dist_pkgsysconf_DATA += \
+       src/journal/systemd-journald.conf
+
 pkgconfiglib_DATA += \
        src/journal/libsystemd-journal.pc
 
 journal-install-data-hook:
+       $(MKDIR_P) -m 0755 \
+               $(DESTDIR)$(systemunitdir)/sockets.target.wants \
+               $(DESTDIR)$(systemunitdir)/sysinit.target.wants
        ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
                rm -f systemd-journald.socket && \
                $(LN_S) ../systemd-journald.socket )
+       ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
+               rm -f systemd-journald.service && \
+               $(LN_S) ../systemd-journald.service )
 
 INSTALL_DATA_HOOKS += \
        journal-install-data-hook
 
 EXTRA_DIST += \
+       src/journal/journald.h \
        src/journal/journal-def.h \
        src/journal/journal-internal.h \
        src/journal/journal-file.h \
@@ -1311,7 +1381,11 @@ EXTRA_DIST += \
        src/journal/journal-rate-limit.h \
        src/journal/libsystemd-journal.pc.in \
        src/journal/libsystemd-journal.sym \
-       units/systemd-journald.service.in
+       units/systemd-journald.service.in \
+       src/journal/journald-gperf.gperf
+
+CLEANFILES += \
+       src/journal/journald-gperf.c
 
 # ------------------------------------------------------------------------------
 if ENABLE_BINFMT
@@ -1334,7 +1408,8 @@ nodist_systemunit_DATA += \
 binfmt-install-data-hook:
        $(MKDIR_P) -m 0755 \
                $(DESTDIR)$(prefix)/lib/binfmt.d \
-               $(DESTDIR)$(sysconfdir)/binfmt.d
+               $(DESTDIR)$(sysconfdir)/binfmt.d \
+               $(DESTDIR)$(systemunitdir)/sysinit.target.wants
        ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
                rm -f systemd-binfmt.service \
                        proc-sys-fs-binfmt_misc.automount && \
@@ -1366,6 +1441,8 @@ nodist_systemunit_DATA += \
        units/systemd-vconsole-setup.service
 
 vconsole-install-data-hook:
+       $(MKDIR_P) -m 0755 \
+               $(DESTDIR)$(systemunitdir)/sysinit.target.wants
        ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
                rm -f systemd-vconsole-setup.service && \
                $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service )
@@ -1421,7 +1498,7 @@ nodist_systemunit_DATA += \
        units/systemd-readahead-done.service
 
 EXTRA_DIST += \
-       src/readahead/sd-readahead.h \
+       src/systemd/sd-readahead.h \
        src/readahead/readahead-common.h \
        units/systemd-readahead-collect.service.in \
        units/systemd-readahead-replay.service.in \
@@ -1470,6 +1547,9 @@ systemd_random_seed_LDADD = \
        libsystemd-basic.la
 
 randomseed-install-data-hook:
+       $(MKDIR_P) -m 0755 \
+               $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
+               $(DESTDIR)$(systemunitdir)/sysinit.target.wants
        ( 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 )
@@ -1514,6 +1594,8 @@ systemd_cryptsetup_generator_LDADD = \
        libsystemd-basic.la
 
 cryptsetup-install-data-hook:
+       $(MKDIR_P) -m 0755 \
+               $(DESTDIR)$(systemunitdir)/sysinit.target.wants
        ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
                rm -f cryptsetup.target && \
                $(LN_S) ../cryptsetup.target cryptsetup.target )
@@ -1843,7 +1925,7 @@ dist_pkgsysconf_DATA += \
        src/login/systemd-logind.conf
 
 pkginclude_HEADERS += \
-       src/login/sd-login.h
+       src/systemd/sd-login.h
 
 lib_LTLIBRARIES += \
        libsystemd-login.la
@@ -1855,6 +1937,8 @@ polkitpolicy_in_files += \
        src/login/org.freedesktop.login1.policy.in
 
 logind-install-data-hook:
+       $(MKDIR_P) -m 0755 \
+               $(DESTDIR)$(systemunitdir)/multi-user.target.wants
        ( cd $(DESTDIR)$(systemunitdir) && \
                rm -f dbus-org.freedesktop.login1.service && \
                $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
@@ -1911,7 +1995,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_service.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 \
@@ -1926,7 +2010,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_service.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
@@ -2050,11 +2134,11 @@ XSLTPROC_PROCESS_MAN_IN = \
 
 XSLTPROC_PROCESS_HTML = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) man/custom-html.xsl $<
+       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
 
 XSLTPROC_PROCESS_HTML_IN = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-       $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) man/custom-html.xsl $< && \
+       $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< && \
        mv ${@:.in=} $@
 
 man/%.1: man/%.xml
@@ -2148,11 +2232,9 @@ systemd-install-data-hook:
                rm -f user && \
                $(LN_S) $(pkgsysconfdir)/user user )
        ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
-               rm -f systemd-initctl.socket systemd-stdout-syslog-bridge.socket systemd-shutdownd.socket syslog.socket && \
-               $(LN_S) ../systemd-stdout-syslog-bridge.socket systemd-stdout-syslog-bridge.socket && \
+               rm -f systemd-initctl.socket systemd-shutdownd.socket && \
                $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
-               $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
-               $(LN_S) ../syslog.socket syslog.socket )
+               $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
        ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
                rm -f systemd-update-utmp-runlevel.service && \
                $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
@@ -2223,8 +2305,7 @@ systemd-install-data-hook:
                        systemd-modules-load.service \
                        systemd-tmpfiles-setup.service \
                        systemd-sysctl.service \
-                       systemd-ask-password-console.path \
-                       systemd-kmsg-syslogd.service && \
+                       systemd-ask-password-console.path && \
                $(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 && \
@@ -2234,8 +2315,7 @@ systemd-install-data-hook:
                $(LN_S) ../systemd-modules-load.service systemd-modules-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) ../systemd-ask-password-console.path systemd-ask-password-console.path )
        ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
                rm -f systemd-tmpfiles-clean.timer && \
                $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
@@ -2363,11 +2443,11 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
        --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
        --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
-       --with-rootdir=$$dc_install_base/$(rootdir)
+       --with-rootprefix=$$dc_install_base/$(rootprefix)
 
 upload: all distcheck
-       cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
-       scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
+       cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
+       scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
        scp man/*.html tango:public/systemd-man/
 
 git-tag: