1 configdir=$(sysconfdir)/dbus-1
2 dbus_daemon_execdir = $(DBUS_DAEMONDIR)
12 DBUS_LAUNCHER_LIBS = \
21 -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
26 # if assertions are enabled, improve backtraces
27 AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
34 org.freedesktop.dbus-session.plist.in
40 if DBUS_ENABLE_LAUNCHD
41 agentdir=$(LAUNCHD_AGENT_DIR)
42 agent_DATA=org.freedesktop.dbus-session.plist
45 XML_SOURCES=config-loader-expat.c
47 if DBUS_BUS_ENABLE_KQUEUE
48 DIR_WATCH_SOURCE=dir-watch-kqueue.c
50 if DBUS_BUS_ENABLE_INOTIFY
51 DIR_WATCH_SOURCE=dir-watch-inotify.c
53 DIR_WATCH_SOURCE=dir-watch-default.c
60 activation-exit-codes.h \
65 config-parser-common.c \
66 config-parser-common.h \
95 dbus_daemon_SOURCES= \
100 $(top_builddir)/dbus/libdbus-internal.la \
104 LAUNCH_HELPER_SOURCES= \
106 config-parser-common.c \
107 config-parser-common.h \
108 config-parser-trivial.c \
109 config-parser-trivial.h \
114 activation-exit-codes.h \
115 activation-helper.h \
118 ## This is the installed launch helper with the setuid checks
119 dbus_daemon_launch_helper_SOURCES= \
120 activation-helper-bin.c \
121 $(LAUNCH_HELPER_SOURCES)
123 dbus_daemon_launch_helper_LDADD= \
124 $(top_builddir)/dbus/libdbus-internal.la \
125 $(DBUS_LAUNCHER_LIBS)
127 ## we build another binary so we can do the launch testing without root privs.
128 ## DO NOT INSTALL THIS FILE
129 dbus_daemon_launch_helper_test_SOURCES= \
130 activation-helper-bin.c \
131 $(LAUNCH_HELPER_SOURCES)
133 dbus_daemon_launch_helper_test_LDADD= \
134 $(top_builddir)/dbus/libdbus-internal.la \
135 $(DBUS_LAUNCHER_LIBS)
137 dbus_daemon_launch_helper_test_CPPFLAGS = \
139 -DACTIVATION_LAUNCHER_TEST
141 ## we build yet another binary so we can do the OOM tests
142 ## DO NOT INSTALL THIS FILE
143 bus_test_launch_helper_SOURCES= \
144 test-launch-helper.c \
145 $(LAUNCH_HELPER_SOURCES)
147 bus_test_launch_helper_LDADD= \
148 $(top_builddir)/dbus/libdbus-internal.la \
149 $(DBUS_LAUNCHER_LIBS)
151 bus_test_launch_helper_CPPFLAGS = \
153 -DACTIVATION_LAUNCHER_TEST \
154 -DACTIVATION_LAUNCHER_DO_OOM
157 dbus_daemon_exec_PROGRAMS = dbus-daemon
159 libexec_PROGRAMS = dbus-daemon-launch-helper
162 ## Note that TESTS has special meaning (stuff to use in make check).
163 ## We don't actually want to run any of these tests until test/ has been
164 ## compiled, so we don't put them in TESTS here; we run them in test/
167 if DBUS_ENABLE_EMBEDDED_TESTS
168 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
169 ## even when not doing "make check"
171 # run as a test by test/Makefile.am
172 noinst_PROGRAMS += bus-test bus-test-system
175 # run as a test by test/Makefile.am
176 noinst_PROGRAMS += bus-test-launch-helper
177 # this is used by the tests but is not,itself, a test
178 noinst_PROGRAMS += dbus-daemon-launch-helper-test
181 endif DBUS_ENABLE_EMBEDDED_TESTS
183 bus_test_system_SOURCES= \
185 config-parser-common.c \
186 config-parser-common.h \
187 config-parser-trivial.c \
188 config-parser-trivial.h \
193 bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
199 bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
201 ## mop up the gcov files
203 /bin/rm *.bb *.bbg *.da *.gcov || true
206 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
207 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
208 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
209 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
210 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
212 # Install dbus.socket as default implementation of a D-Bus stack.
213 # Deliberately not using $(LN_S) here: ln -fs is not universally portable,
214 # but neither is systemd, so it's OK to assume here that ln complies with SUS.
215 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
216 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
217 # Unconditionally enable D-Bus on systemd installations
218 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
219 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
220 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants
221 ln -fs ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
226 if test `id -u` -eq 0; then \
227 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
228 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
230 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
231 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
235 #### Init scripts fun
236 SCRIPT_IN_FILES=messagebus.in \
237 messagebus-config.in \
241 if DBUS_INIT_SCRIPTS_RED_HAT
243 initddir=$(sysconfdir)/rc.d/init.d
252 if DBUS_INIT_SCRIPTS_SLACKWARE
254 initddir=$(sysconfdir)/rc.d/
263 if DBUS_INIT_SCRIPTS_CYGWIN
276 systemdsystemunit_DATA = \
283 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)