summaryrefslogtreecommitdiff
path: root/bus/Makefile.am
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-03-22 12:11:27 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-04-26 18:41:18 +0100
commitb0acdedae19f54c08e0f61833db8faf14aacaf87 (patch)
treeda7dae99d6bf25f6753d1e11073d0f63fe487bb0 /bus/Makefile.am
parent59c6663293bbbd9399f4c16611e06bbe799ddb8a (diff)
downloaddbus-b0acdedae19f54c08e0f61833db8faf14aacaf87.tar.gz
Install dbus-daemon and dbus-daemon-launch-helper in the conventional way
Also remove some pointless indirection (extra_tests etc.), don't install the unused directory $(libexecdir)/dbus-1 (we actually install the launch helper directly into $(libexecdir)), and allow dbus_daemondir to be set on Windows rather than forcing dbus-daemon to be installed to $(bindir) there. dbus_daemon_execdir has to contain "exec" so that the dbus-daemon will be installed by "make install-exec" and not "make install-data". Bug: https://bugs.freedesktop.org/show_bug.cgi?id=14512 Reviewed-by: Colin Walters <walters@verbum.org>
Diffstat (limited to 'bus/Makefile.am')
-rw-r--r--bus/Makefile.am68
1 files changed, 27 insertions, 41 deletions
diff --git a/bus/Makefile.am b/bus/Makefile.am
index efa8ab5b..5cba22ba 100644
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
@@ -1,5 +1,5 @@
-
configdir=$(sysconfdir)/dbus-1
+dbus_daemon_execdir = $(DBUS_DAEMONDIR)
INCLUDES=-I$(top_srcdir) $(DBUS_BUS_CFLAGS) @PIE_CFLAGS@ \
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
@@ -145,31 +145,28 @@ bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \
-DACTIVATION_LAUNCHER_TEST \
-DACTIVATION_LAUNCHER_DO_OOM
-extra_tests=
-extra_noinst_programs=
-extra_inst_programs=
-if DBUS_UNIX
-extra_tests+=bus-test-launch-helper
-extra_noinst_programs+=dbus-daemon-launch-helper dbus-daemon-launch-helper-test dbus-daemon
-endif
-if DBUS_WIN
-extra_inst_programs+=dbus-daemon
-endif
+## we use noinst_PROGRAMS not check_PROGRAMS so that we build
+## even when not doing "make check"
+noinst_PROGRAMS = $(TESTS)
+dbus_daemon_exec_PROGRAMS = dbus-daemon
+libexec_PROGRAMS = dbus-daemon-launch-helper
## note that TESTS has special meaning (stuff to use in make check)
## so if adding tests not to be run in make check, don't add them to
## TESTS
+TESTS =
+
if DBUS_BUILD_TESTS
TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1
-TESTS=bus-test bus-test-system $(extra_tests)
-else
-TESTS=
-endif
+TESTS += bus-test bus-test-system
-## we use noinst_PROGRAMS not check_PROGRAMS so that we build
-## even when not doing "make check"
-noinst_PROGRAMS=$(TESTS) $(extra_noinst_programs)
-bin_PROGRAMS=$(extra_inst_programs)
+if DBUS_UNIX
+TESTS += bus-test-launch-helper
+# this is used by the tests but is not,itself, a test
+noinst_PROGRAMS += dbus-daemon-launch-helper-test
+endif DBUS_UNIX
+
+endif DBUS_BUILD_TESTS
bus_test_system_SOURCES= \
$(XML_SOURCES) \
@@ -197,34 +194,12 @@ bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
clean-local:
/bin/rm *.bb *.bbg *.da *.gcov || true
-uninstall-hook:
- rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT)
- rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT)
-
install-data-hook:
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
$(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
$(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
-if DBUS_UNIX
- if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \
- $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \
- chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
- fi
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) dbus-daemon$(EXEEXT) $(DESTDIR)$(DBUS_DAEMONDIR)
- $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1
- if test -f dbus-daemon-launch-helper$(EXEEXT) ; then \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) dbus-daemon-launch-helper$(EXEEXT) $(DESTDIR)$(libexecdir); \
- if test `id -u` -eq 0; then \
- chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
- chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
- else \
- echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
- echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
- fi \
- fi
-endif
if HAVE_SYSTEMD
# Install dbus.socket as default implementation of a D-Bus stack
$(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
@@ -236,6 +211,17 @@ if HAVE_SYSTEMD
$(LN_S) ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
endif
+if DBUS_UNIX
+install-exec-hook:
+ if test `id -u` -eq 0; then \
+ chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
+ chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
+ else \
+ echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
+ echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
+ fi
+endif
+
#### Init scripts fun
SCRIPT_IN_FILES=messagebus.in \
messagebus-config.in \