1 dbusdatadir=$(datadir)/dbus-1
2 legacydbusdatadir=$(sysconfdir)/dbus-1
3 dbus_daemon_execdir = $(DBUS_DAEMONDIR)
15 DBUS_LAUNCHER_LIBS = \
23 $(DBUS_STATIC_BUILD_CPPFLAGS) \
26 -DDBUS_SYSTEM_CONFIG_FILE=\""$(dbusdatadir)/system.conf"\" \
31 # if assertions are enabled, improve backtraces
32 AM_LDFLAGS = @R_DYNAMIC_LDFLAG@ -Wl,-z,relro,-z,now
39 legacy-config/session.conf.in \
40 legacy-config/system.conf.in \
41 org.freedesktop.dbus-session.plist.in \
42 example-system-enable-stats.conf.in \
43 example-session-disable-stats.conf.in \
46 dbusdata_DATA = session.conf
47 legacydbusdata_DATA = legacy-config/session.conf
50 dbusdata_DATA += system.conf
51 legacydbusdata_DATA += legacy-config/system.conf
54 examplesdir = ${docdir}/examples
56 example-system-enable-stats.conf \
57 example-session-disable-stats.conf \
60 if DBUS_ENABLE_LAUNCHD
61 agentdir=$(LAUNCHD_AGENT_DIR)
62 agent_DATA=org.freedesktop.dbus-session.plist
65 XML_SOURCES=config-loader-expat.c
67 if DBUS_BUS_ENABLE_KQUEUE
68 DIR_WATCH_SOURCE=dir-watch-kqueue.c
70 if DBUS_BUS_ENABLE_INOTIFY
71 DIR_WATCH_SOURCE=dir-watch-inotify.c
73 DIR_WATCH_SOURCE=dir-watch-default.c
80 activation-exit-codes.h \
91 config-parser-common.c \
92 config-parser-common.h \
123 dbus_daemon_SOURCES= \
128 $(top_builddir)/dbus/libdbus-1.la \
129 $(top_builddir)/dbus/libdbus-internal.la \
133 LAUNCH_HELPER_SOURCES= \
135 config-parser-common.c \
136 config-parser-common.h \
137 config-parser-trivial.c \
138 config-parser-trivial.h \
143 activation-exit-codes.h \
144 activation-helper.h \
147 ## This is the installed launch helper with the setuid checks
148 dbus_daemon_launch_helper_SOURCES= \
149 activation-helper-bin.c \
150 $(LAUNCH_HELPER_SOURCES)
152 dbus_daemon_launch_helper_LDADD= \
153 $(top_builddir)/dbus/libdbus-1.la \
154 $(top_builddir)/dbus/libdbus-internal.la \
155 $(DBUS_LAUNCHER_LIBS)
157 ## we build another binary so we can do the launch testing without root privs.
158 ## DO NOT INSTALL THIS FILE
159 dbus_daemon_launch_helper_test_SOURCES= \
160 activation-helper-bin.c \
161 $(LAUNCH_HELPER_SOURCES)
163 dbus_daemon_launch_helper_test_LDADD= \
164 $(top_builddir)/dbus/libdbus-1.la \
165 $(top_builddir)/dbus/libdbus-internal.la \
166 $(DBUS_LAUNCHER_LIBS)
168 dbus_daemon_launch_helper_test_CPPFLAGS = \
170 -DACTIVATION_LAUNCHER_TEST
172 ## we build yet another binary so we can do the OOM tests
173 ## DO NOT INSTALL THIS FILE
174 test_bus_launch_helper_SOURCES= \
175 test-launch-helper.c \
176 $(LAUNCH_HELPER_SOURCES)
178 test_bus_launch_helper_LDADD= \
179 $(top_builddir)/dbus/libdbus-1.la \
180 $(top_builddir)/dbus/libdbus-internal.la \
181 $(DBUS_LAUNCHER_LIBS)
184 test_bus_launch_helper_CPPFLAGS = \
186 -DACTIVATION_LAUNCHER_TEST \
187 -DACTIVATION_LAUNCHER_DO_OOM
190 dbus_daemon_exec_PROGRAMS = dbus-daemon
192 libexec_PROGRAMS = dbus-daemon-launch-helper
195 ## Note that TESTS has special meaning (stuff to use in make check).
196 ## We don't actually want to run any of these tests until test/ has been
197 ## compiled, so we don't put them in TESTS here; we run them in test/
200 if DBUS_ENABLE_EMBEDDED_TESTS
201 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
202 ## even when not doing "make check"
204 # run as a test by test/Makefile.am
205 noinst_PROGRAMS += test-bus
208 # run as a test by test/Makefile.am
209 noinst_PROGRAMS += test-bus-launch-helper test-bus-system
210 # this is used by the tests but is not,itself, a test
211 noinst_PROGRAMS += dbus-daemon-launch-helper-test
214 endif DBUS_ENABLE_EMBEDDED_TESTS
216 test_bus_system_SOURCES= \
218 config-parser-common.c \
219 config-parser-common.h \
220 config-parser-trivial.c \
221 config-parser-trivial.h \
226 test_bus_system_LDADD = \
227 $(top_builddir)/dbus/libdbus-1.la \
228 $(top_builddir)/dbus/libdbus-internal.la \
237 $(top_builddir)/dbus/libdbus-1.la \
238 $(top_builddir)/dbus/libdbus-internal.la \
242 ## mop up the gcov files
244 /bin/rm *.bb *.bbg *.da *.gcov || true
247 $(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/session.d
248 $(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/services
250 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
251 $(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/system.d
252 $(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/system-services
255 # Install dbus.socket as default implementation of a D-Bus stack.
256 # Deliberately not using $(LN_S) here: ln -fs is not universally portable,
257 # but neither is systemd, so it's OK to assume here that ln complies with SUS.
258 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
259 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
260 # Unconditionally enable D-Bus on systemd installations
261 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
262 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
264 if DBUS_ENABLE_USER_SESSION
265 $(mkinstalldirs) $(DESTDIR)$(systemduserunitdir)/sockets.target.wants
266 ln -fs ../dbus.socket $(DESTDIR)$(systemduserunitdir)/sockets.target.wants/dbus.socket
271 if test `id -u` -eq 0; then \
272 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
273 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
275 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
276 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
280 #### Init scripts fun
281 SCRIPT_IN_FILES=messagebus.in \
282 messagebus-config.in \
286 if DBUS_INIT_SCRIPTS_RED_HAT
288 initddir=$(sysconfdir)/rc.d/init.d
297 if DBUS_INIT_SCRIPTS_SLACKWARE
299 initddir=$(sysconfdir)/rc.d/
308 if DBUS_INIT_SCRIPTS_CYGWIN
320 systemd-user/dbus.service.in \
321 systemd-user/dbus.socket.in \
324 systemdsystemunit_DATA = \
329 if DBUS_ENABLE_USER_SESSION
330 systemduserunit_DATA = \
331 systemd-user/dbus.service \
332 systemd-user/dbus.socket \
338 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)