summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vcgomes@gmail.com>2015-03-25 15:46:32 -0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2015-03-27 16:52:42 +0200
commitac332c5d01b0737c18cb58c8ccc67cf6b0427e1d (patch)
tree2ad4989d6aed5d5f332385e892dee408de4fd982 /Makefile.am
parentfbbfe39e030352c6d5b210c77a25e6c7632aab29 (diff)
downloadconnman-ac332c5d01b0737c18cb58c8ccc67cf6b0427e1d.tar.gz
build: Fix having unexpanded variables in .service files
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
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 19cc8b13..6a6e3551 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)/$< $@