aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2024-02-16 23:11:05 +0000
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-02-20 08:50:26 -0500
commit9fe4ccb79ffa0faa3084ce1be12685585d68e85e (patch)
tree9581017fac74c59230e59aa8efe9d0bb7fc19f88
parentf79ccf6c429ed28e5aac8c68ed818aa2d7d5351d (diff)
build: rework {install-data,uninstall}-hook
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.
-rw-r--r--Makefile.am5
-rw-r--r--Makefile.obexd10
2 files changed, 12 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 5207c172bb..450e931c6e 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 81456544d9..0e8bc6de7a 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