chiark / gitweb /
manager: recheck unit paths on daemon reload
[elogind.git] / Makefile.am
index 28e52fee2fa7d709b7045e08bbadf2118f245311..03591bed15133627352efb86a18164bd9b5fffac 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
@@ -67,10 +69,13 @@ noinst_PROGRAMS = \
 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 \
@@ -338,6 +343,13 @@ systemd_cgroups_agent_CPPFLAGS = \
 systemd_cgroups_agent_LDADD = \
        $(DBUS_LIBS)
 
+systemctl_SOURCES = \
+       src/systemctl.c \
+       $(BASIC_SOURCES)
+
+systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUS_CFLAGS)
+systemctl_LDADD = $(DBUS_LIBS)
+
 VALAFLAGS = \
        -g \
        --save-temps \
@@ -353,13 +365,6 @@ VALA_CFLAGS = \
        -Wno-unused-variable \
        -Wno-unused-function
 
-systemctl_SOURCES = \
-       src/systemctl.vala \
-       src/systemd-interfaces.vala
-
-systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS)
-systemctl_LDADD = $(DBUSGLIB_LIBS)
-
 systemadm_SOURCES = \
        src/systemadm.vala \
        src/systemd-interfaces.vala
@@ -412,7 +417,6 @@ CLEANFILES = \
 if HAVE_VALAC
 CLEANFILES += \
        src/systemd-interfaces.c \
-       src/systemctl.c \
        src/systemadm.c
 endif
 
@@ -464,7 +468,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 +535,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 +564,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)