This is because @sbindir@ is defined in terms of ${exec_prefix}, which
will cause this unexpanded variable to appear in the final .service file
causing connman systemd service to be unable to be loaded.

This problem is referenced (along with a suggested way to avoid it) here:

http://www.gnu.org/software/automake/manual/html_node/Scripts.html#Scripts
---
 Makefile.am  | 8 ++++++++
 configure.ac | 5 ++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 19cc8b1..6a6e355 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -432,6 +432,14 @@ endif
 
 EXTRA_DIST += vpn/connman-task.te
 
+do_subst = $(AM_V_GEN)$(SED) \
+               -e 's,[@]prefix[@],$(prefix),g' \
+               -e 's,[@]sbindir[@],$(sbindir),g' \
+               -e 's,[@]sysconfdir[@],$(sysconfdir),g'
+
+%.service: %.service.in Makefile
+       $(do_subst) < $< > $@
+
 include/connman/version.h: include/version.h
        $(AM_V_at)$(MKDIR_P) include/connman
        $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
diff --git a/configure.ac b/configure.ac
index 6fa01ba..dd4b271 100644
--- a/configure.ac
+++ b/configure.ac
@@ -384,6 +384,5 @@ AM_CONDITIONAL(VPN, test "${enable_openconnect}" != "no" -o 
\
                        "${enable_l2tp}" != "no" -o \
                        "${enable_pptp}" != "no")
 
-AC_OUTPUT(Makefile include/version.h src/connman.service
-               vpn/connman-vpn.service vpn/net.connman.vpn.service
-               scripts/connman connman.pc src/net.connman.service)
+AC_OUTPUT(Makefile include/version.h scripts/connman
+                  connman.pc)
-- 
2.3.3

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to