summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-11-22 16:46:00 (GMT)
committerKristian Høgsberg <krh@bitplanet.net>2013-11-28 06:49:31 (GMT)
commite3de16ea308ffb423504b863629550828564c329 (patch)
tree5bb1c8884ef1e9dd82c32bf69b70908f12e398df
parentbf3c1c6913cf00e12a579a637abb8c4e68233a8c (diff)
downloadweston-e3de16ea308ffb423504b863629550828564c329.tar.gz
weston-e3de16ea308ffb423504b863629550828564c329.tar.xz
Automatically generate weston.ini with the right paths
Previously weston.ini had hardcoded paths for the weston-* clients in /usr/bin and /usr/libexec. This was a bit annoying when testing Weston because you wouldn't usually install those in the system prefix. This patch adds a make rule to automatically generate weston.ini from a template file with some replacement markers for the paths so that they can have the right prefix.
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am11
-rw-r--r--weston.ini.in (renamed from weston.ini)8
3 files changed, 15 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index b3fb2a1..111c56c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ cscope.out
/missing
/stamp-h1
/test-driver
+/weston.ini
Makefile
Makefile.in
TAGS
diff --git a/Makefile.am b/Makefile.am
index e9ecc38..3a7d337 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,4 +6,13 @@ SUBDIRS = shared src clients data protocol tests $(wcap_subdir) man
DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
-EXTRA_DIST = weston.ini wayland-scanner.mk
+EXTRA_DIST = weston.ini.in wayland-scanner.mk
+
+weston.ini : $(srcdir)/weston.ini.in
+ $(AM_V_GEN)$(SED) \
+ -e 's|@bindir[@]|$(bindir)|g' \
+ -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
+ -e 's|@libexecdir[@]|$(libexecdir)|g' \
+ $< > $@
+
+all-local : weston.ini
diff --git a/weston.ini b/weston.ini.in
index 4761bed..5181a9e 100644
--- a/weston.ini
+++ b/weston.ini.in
@@ -27,7 +27,7 @@ path=/usr/bin/gnome-terminal
[launcher]
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
-path=/usr/bin/weston-terminal
+path=@bindir@/weston-terminal
[launcher]
icon=/usr/share/icons/hicolor/24x24/apps/google-chrome.png
@@ -35,15 +35,15 @@ path=/usr/bin/google-chrome
[launcher]
icon=/usr/share/icons/gnome/24x24/apps/arts.png
-path=./clients/weston-flower
+path=@abs_top_builddir@/clients/weston-flower
[screensaver]
# Uncomment path to disable screensaver
-path=/usr/libexec/weston-screensaver
+path=@libexecdir@/weston-screensaver
duration=600
[input-method]
-path=/usr/libexec/weston-keyboard
+path=@libexecdir@/weston-keyboard
#[output]
#name=LVDS1