chiark / gitweb /
notify: add systemd-notify command line tool
[elogind.git] / Makefile.am
index 28e52fee2fa7d709b7045e08bbadf2118f245311..197407cdb05a750f6a453cfae1d0f8383aeea6c1 100644 (file)
 ACLOCAL_AMFLAGS = -I m4
 
 # Dirs of external packages
-dbuspolicydir=$(sysconfdir)/dbus-1/system.d
+dbuspolicydir=@dbuspolicydir@
+dbussessionservicedir=@dbussessionservicedir@
+dbussystemservicedir=@dbussystemservicedir@
+dbusinterfacedir=@dbusinterfacedir@
 udevrulesdir=@udevrulesdir@
-interfacedir=$(datadir)/dbus-1/interfaces
 
 # Our own, non-special dirs
 pkgsysconfdir=$(sysconfdir)/systemd
@@ -46,10 +48,14 @@ AM_CPPFLAGS = \
 
 rootbin_PROGRAMS = \
        systemd \
-       systemctl
+       systemctl \
+       systemd-notify
 
-if HAVE_GTK
 bin_PROGRAMS = \
+       systemd-install
+
+if HAVE_GTK
+bin_PROGRAMS += \
        systemadm
 endif
 
@@ -62,15 +68,19 @@ noinst_PROGRAMS = \
        test-engine \
        test-job-type \
        test-ns \
-       test-loopback
+       test-loopback \
+       test-daemon
 
 dist_dbuspolicy_DATA = \
        src/org.freedesktop.systemd1.conf
 
+dist_dbussystemservice_DATA = \
+       src/org.freedesktop.systemd1.service
+
 dist_udevrules_DATA = \
        src/99-systemd.rules
 
-interface_DATA = \
+dbusinterface_DATA = \
        org.freedesktop.systemd1.Manager.xml \
        org.freedesktop.systemd1.Job.xml \
        org.freedesktop.systemd1.Unit.xml \
@@ -176,6 +186,15 @@ dist_systemunit_DATA += \
        units/gentoo/xdm.service
 endif
 
+if TARGET_ARCH
+dist_systemunit_DATA += \
+       units/arch/sysinit.service \
+       units/arch/rc-local.service \
+       units/arch/halt.service \
+       units/arch/poweroff.service \
+       units/arch/reboot.service
+endif
+
 # This is needed because automake is buggy in how it generates the
 # 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.
@@ -194,6 +213,7 @@ COMMON_SOURCES = \
        src/unit.c \
         src/job.c \
         src/manager.c \
+       src/path-lookup.c \
         src/load-fragment.c \
         src/service.c \
         src/automount.c \
@@ -231,7 +251,8 @@ COMMON_SOURCES = \
        src/specifier.c \
        src/unit-name.c \
        src/fdset.c \
-       src/namespace.c
+       src/namespace.c \
+       src/tcpwrap.c
 
 EXTRA_DIST += \
        ${COMMON_SOURCES:.c=.h} \
@@ -269,8 +290,8 @@ systemd_SOURCES = \
        $(COMMON_SOURCES) \
        src/main.c
 
-systemd_CPPFLAGS = \
-       $(AM_CPPFLAGS) \
+systemd_CFLAGS = \
+       $(AM_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(UDEV_CFLAGS) \
        $(CGROUP_CFLAGS)
@@ -278,20 +299,22 @@ systemd_CPPFLAGS = \
 systemd_LDADD = \
        $(DBUS_LIBS) \
        $(UDEV_LIBS) \
-       $(CGROUP_LIBS)
+       $(CGROUP_LIBS) \
+       $(LIBWRAP_LIBS) \
+       $(PAM_LIBS)
 
 test_engine_SOURCES = \
        $(COMMON_SOURCES) \
        src/test-engine.c
 
-test_engine_CPPFLAGS = $(systemd_CPPFLAGS)
+test_engine_CFLAGS = $(systemd_CFLAGS)
 test_engine_LDADD = $(systemd_LDADD)
 
 test_job_type_SOURCES = \
        $(COMMON_SOURCES) \
        src/test-job-type.c
 
-test_job_type_CPPFLAGS = $(systemd_CPPFLAGS)
+test_job_type_CFLAGS = $(systemd_CFLAGS)
 test_job_type_LDADD = $(systemd_LDADD)
 
 test_ns_SOURCES = \
@@ -299,7 +322,7 @@ test_ns_SOURCES = \
        src/test-ns.c \
        src/namespace.c
 
-test_ns_CPPFLAGS = $(systemd_CPPFLAGS)
+test_ns_CFLAGS = $(systemd_CFLAGS)
 test_ns_LDADD = $(systemd_LDADD)
 
 test_loopback_SOURCES = \
@@ -307,21 +330,27 @@ test_loopback_SOURCES = \
        src/test-loopback.c \
        src/loopback-setup.c
 
-test_loopback_CPPFLAGS = $(systemd_CPPFLAGS)
-test_loopback_LDADD = $(systemd_LDADD)
+test_daemon_SOURCES = \
+       $(BASIC_SOURCES) \
+       src/test-daemon.c \
+       src/sd-daemon.c
 
 systemd_logger_SOURCES = \
        $(BASIC_SOURCES) \
        src/logger.c \
-       src/sd-daemon.c
+       src/sd-daemon.c \
+       src/tcpwrap.c
+
+systemd_logger_LDADD = \
+       $(LIBWRAP_LIBS)
 
 systemd_initctl_SOURCES = \
        $(BASIC_SOURCES) \
        src/initctl.c \
        src/sd-daemon.c
 
-systemd_initctl_CPPFLAGS = \
-       $(AM_CPPFLAGS) \
+systemd_initctl_CFLAGS = \
+       $(AM_CFLAGS) \
        $(DBUS_CFLAGS)
 
 systemd_initctl_LDADD = \
@@ -331,40 +360,52 @@ systemd_cgroups_agent_SOURCES = \
        $(BASIC_SOURCES) \
        src/cgroups-agent.c
 
-systemd_cgroups_agent_CPPFLAGS = \
-       $(AM_CPPFLAGS) \
+systemd_cgroups_agent_CFLAGS = \
+       $(AM_CFLAGS) \
        $(DBUS_CFLAGS)
 
 systemd_cgroups_agent_LDADD = \
        $(DBUS_LIBS)
 
-VALAFLAGS = \
-       -g \
-       --save-temps \
-       --pkg=dbus-glib-1 \
-       --pkg=posix
+systemctl_SOURCES = \
+       src/systemctl.c \
+       $(BASIC_SOURCES)
 
-if HAVE_GTK
-VALAFLAGS += \
-       --pkg=gtk+-2.0
-endif
+systemctl_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
+systemctl_LDADD = $(DBUS_LIBS)
 
-VALA_CFLAGS = \
-       -Wno-unused-variable \
-       -Wno-unused-function
+systemd_notify_SOURCES = \
+       src/notify.c \
+       src/sd-daemon.c \
+       $(BASIC_SOURCES)
 
-systemctl_SOURCES = \
-       src/systemctl.vala \
-       src/systemd-interfaces.vala
+systemd_install_SOURCES = \
+       src/install.c \
+       src/path-lookup.c \
+       $(BASIC_SOURCES)
 
-systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS)
-systemctl_LDADD = $(DBUSGLIB_LIBS)
+# We don't really link here against D-Bus, however we indirectly include D-Bus header files
+systemd_install_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
 
 systemadm_SOURCES = \
        src/systemadm.vala \
        src/systemd-interfaces.vala
 
-systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(VALA_CFLAGS)
+systemadm_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUSGLIB_CFLAGS) \
+       $(GTK_CFLAGS) \
+       -Wno-unused-variable \
+       -Wno-unused-function \
+       -Wno-shadow \
+       -Wno-format-nonliteral
+
+systemadm_VALAFLAGS = \
+       --pkg=dbus-glib-1 \
+       --pkg=posix \
+       --pkg=gtk+-2.0 \
+       -g
+
 systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
 
 SED_PROCESS = \
@@ -412,7 +453,6 @@ CLEANFILES = \
 if HAVE_VALAC
 CLEANFILES += \
        src/systemd-interfaces.c \
-       src/systemctl.c \
        src/systemadm.c
 endif
 
@@ -464,7 +504,7 @@ endif
 org.freedesktop.systemd1.%.xml: systemd
        $(AM_V_GEN)./systemd --introspect=${@:.xml=} > $@
 
-CLEANFILES += $(interface_DATA)
+CLEANFILES += $(dbusinterface_DATA)
 
 install-data-hook:
        $(MKDIR_P) -m 0755 \
@@ -531,6 +571,9 @@ install-data-hook:
                $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
                $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
                $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
+       ( cd $(DESTDIR)$(dbussessionservicedir) && \
+               rm -f org.freedesktop.systemd1.service && \
+               $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
 if TARGET_FEDORA
        ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
                rm -f display-manager.service && \
@@ -557,5 +600,9 @@ if TARGET_GENTOO
 endif
 
 DISTCHECK_CONFIGURE_FLAGS = \
+       --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
+       --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
+       --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
+       --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
        --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
        --with-rootdir=$$dc_install_base/$(rootdir)