From: Emil Velikov <emil.l.velikov@xxxxxxxxx> Currently autoconfigure throws a useful error, about a duplicate install-data-hook. Address that by making the two target specific and pulling them as dependencies. We have to create empty ones otherwise dependency tracking and resolution will fail. --- Makefile.am | 5 ++++- Makefile.obexd | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5207c172b..450e931c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,7 +31,7 @@ AM_LDFLAGS = $(MISC_LDFLAGS) confdir = $(sysconfdir)/bluetooth statedir = $(localstatedir)/lib/bluetooth -install-data-hook: +bluetoothd-fix-permissions: install -dm555 $(DESTDIR)$(confdir) install -dm700 $(DESTDIR)$(statedir) @@ -422,6 +422,9 @@ include Makefile.obexd include android/Makefile.am include Makefile.mesh +install-data-hook: bluetoothd-fix-permissions obexd-add-service-symlink +uninstall-hook: obexd-remove-service-symlink + if HID2HCI rulesdir = $(UDEV_DIR)/rules.d diff --git a/Makefile.obexd b/Makefile.obexd index 81456544d..0e8bc6de7 100644 --- a/Makefile.obexd +++ b/Makefile.obexd @@ -3,11 +3,14 @@ if SYSTEMD systemduserunitdir = $(SYSTEMD_USERUNITDIR) systemduserunit_DATA = obexd/src/obex.service -install-data-hook: +obexd-add-service-symlink: $(LN_S) -f obex.service $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service -uninstall-hook: +obexd-remove-service-symlink: rm -f $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service +else +obexd-add-service-symlink: +obexd-remove-service-symlink: endif dbussessionbusdir = $(DBUS_SESSIONBUSDIR) @@ -102,6 +105,9 @@ obexd_src_obexd_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) \ obexd_src_obexd_CFLAGS = $(AM_CFLAGS) -fPIC +else +obexd-add-service-symlink: +obexd-remove-service-symlink: endif obexd_src_obexd_SHORTNAME = obexd -- 2.43.1