chiark / gitweb /
unit: use the UNIT() macro consistently
[elogind.git] / Makefile.am
index 7962db032f8ff194bf883d95471c281d03a6cc6b..607ae7eadd7a837f6163a08928f6a078a060d4fb 100644 (file)
@@ -52,16 +52,17 @@ bashcompletiondir=$(sysconfdir)/bash_completion.d
 pkgsysconfdir=$(sysconfdir)/systemd
 userunitdir=$(prefix)/lib/systemd/user
 tmpfilesdir=$(prefix)/lib/tmpfiles.d
+sysctldir=$(prefix)/lib/sysctl.d
 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 +90,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\" \
@@ -99,7 +101,8 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src \
        -I $(top_srcdir)/src/readahead \
        -I $(top_srcdir)/src/login \
-       -I $(top_srcdir)/src/journal
+       -I $(top_srcdir)/src/journal \
+       -I $(top_srcdir)/src/systemd
 
 if TARGET_GENTOO
 AM_CPPFLAGS += \
@@ -179,7 +182,6 @@ bin_PROGRAMS += \
 endif
 
 rootlibexec_PROGRAMS = \
-       systemd-stdout-syslog-bridge \
        systemd-cgroups-agent \
        systemd-initctl \
        systemd-update-utmp \
@@ -187,7 +189,6 @@ rootlibexec_PROGRAMS = \
        systemd-shutdown \
        systemd-modules-load \
        systemd-remount-api-vfs \
-       systemd-kmsg-syslogd \
        systemd-reply-password \
        systemd-fsck \
        systemd-timestamp \
@@ -285,7 +286,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 \
@@ -317,9 +317,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 \
@@ -351,9 +349,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 \
@@ -371,7 +367,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 \
@@ -442,7 +438,7 @@ dist_doc_DATA = \
        DISTRO_PORTING
 
 pkgconfigdata_DATA = \
-       systemd.pc
+       src/systemd.pc
 
 # First passed through sed, followed by intltool
 polkitpolicy_in_in_files = \
@@ -567,8 +563,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 \
@@ -591,7 +647,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 \
@@ -748,15 +805,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
@@ -905,14 +953,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 \
@@ -925,7 +965,7 @@ systemctl_SOURCES = \
        src/pager.c \
        src/install.c \
        src/spawn-agent.c \
-        src/logs-show.c
+       src/logs-show.c
 
 systemctl_CFLAGS = \
        $(AM_CFLAGS) \
@@ -935,6 +975,7 @@ systemctl_LDADD = \
        libsystemd-basic.la \
        libsystemd-daemon.la \
        libsystemd-journal.la \
+       libsystemd-id128.la \
        $(DBUS_LIBS)
 
 systemd_notify_SOURCES = \
@@ -1051,7 +1092,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:
@@ -1076,7 +1117,7 @@ lib_LTLIBRARIES += \
        libsystemd-daemon.la
 
 pkgconfiglib_DATA += \
-       libsystemd-daemon.pc
+        src/libsystemd-daemon.pc
 
 MANPAGES += \
        man/sd-daemon.7 \
@@ -1099,7 +1140,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
 
 # ------------------------------------------------------------------------------
@@ -1129,13 +1170,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:
@@ -1157,7 +1198,7 @@ UNINSTALL_EXEC_HOOKS += \
        libsystemd-id128-uninstall-hook
 
 EXTRA_DIST += \
-       libsystemd-id128.pc.in \
+       src/libsystemd-id128.pc.in \
        src/libsystemd-id128.sym
 
 # ------------------------------------------------------------------------------
@@ -1168,9 +1209,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)
@@ -1190,20 +1238,28 @@ systemd_journald_LDADD += \
        $(XZ_LIBS)
 endif
 
+systemd_cat_SOURCES = \
+        src/journal/cat.c
+
+systemd_cat_LDADD = \
+       libsystemd-basic.la \
+       libsystemd-journal.la
+
 systemd_journalctl_SOURCES = \
        src/journal/journalctl.c \
        src/pager.c \
-        src/logs-show.c
+       src/logs-show.c
 
 systemd_journalctl_LDADD = \
        libsystemd-basic.la \
-        libsystemd-journal.la
+       libsystemd-journal.la \
+       libsystemd-id128.la
 
 if HAVE_XZ
 systemd_journalctl_SOURCES += \
        src/journal/compress.c
 systemd_journalctl_CFLAGS = \
-        $(AM_CFLAGS) \
+       $(AM_CFLAGS) \
        $(XZ_CFLAGS)
 systemd_journalctl_LDADD += \
        $(XZ_LIBS)
@@ -1225,7 +1281,7 @@ test_journal_SOURCES += \
        src/journal/compress.c
 
 test_journal_CFLAGS = \
-        $(AM_CFLAGS) \
+       $(AM_CFLAGS) \
        $(XZ_CFLAGS)
 
 test_journal_LDADD += \
@@ -1285,7 +1341,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
@@ -1296,24 +1353,37 @@ rootlibexec_PROGRAMS += \
 rootbin_PROGRAMS += \
        systemd-journalctl
 
+bin_PROGRAMS += \
+        systemd-cat
+
 dist_systemunit_DATA += \
        units/systemd-journald.socket
 
 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 \
@@ -1322,7 +1392,32 @@ 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_COREDUMP
+
+systemd_coredump_SOURCES = \
+        src/journal/coredump.c
+
+systemd_coredump_LDADD = \
+       libsystemd-basic.la \
+       libsystemd-journal.la \
+       libsystemd-login.la
+
+rootlibexec_PROGRAMS += \
+        systemd-coredump
+
+sysctl_DATA = \
+        sysctl.d/coredump.conf
+
+EXTRA_DIST += \
+        sysctl.d/coredump.conf.in
+
+endif
 
 # ------------------------------------------------------------------------------
 if ENABLE_BINFMT
@@ -1345,7 +1440,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 && \
@@ -1377,6 +1473,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 )
@@ -1432,7 +1530,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 \
@@ -1481,6 +1579,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 )
@@ -1525,6 +1626,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 )
@@ -1854,7 +1957,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
@@ -1866,6 +1969,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)
@@ -1991,6 +2096,9 @@ units/%: units/%.in Makefile
 man/%: man/%.in Makefile
        $(SED_PROCESS)
 
+sysctl.d/%: sysctl.d/%.in Makefile
+       $(SED_PROCESS)
+
 %.pc: %.pc.in Makefile
        $(SED_PROCESS)
 
@@ -2159,11 +2267,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 )
@@ -2234,8 +2340,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 && \
@@ -2245,8 +2350,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 )
@@ -2374,11 +2478,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: