summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2012-09-07 14:30:46 +0200
committerSjoerd Simons <sjoerd@luon.net>2012-09-07 14:30:46 +0200
commit0397320f866e2a4292a79195cdae1f23712a85c2 (patch)
tree65e21257ac1a7c5da89f7e9ec876d557327863dd
parent60f12cc94bac77131b870559dc8b4a8c0c7be73c (diff)
Also generate wrappers for running in uninstalled mode
-rw-r--r--src/Makefile.am20
-rw-r--r--src/phoenix-test.in2
-rw-r--r--src/phoenix.in2
3 files changed, 19 insertions, 5 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index f75497f..9df8410 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,6 +6,7 @@ EXTRA_DIST = \
bin_SCRIPTS=phoenix phoenix-test
bin_SCRIPTS_IN=phoenix.in phoenix-test.in
+BUILT_SOURCES=phoenix-uninstalled phoenix-test-uninstalled
pythondir = $(pkgdatadir)
python_DATA=phoenix.py phoenix-test.py util.py
@@ -25,9 +26,22 @@ phoenix_echo_call_LDFLAGS = @GLIB_LIBS@ @TP_GLIB_LIBS@ \
@TP_FARSTREAM_LIBS@
phoenix: phoenix.in
- sed -e "s,PKGDATADIR,$(pkgdatadir)," < $< > $@
+ sed -e "s,[@]DATADIR[@],$(pkgdatadir)/data," \
+ -e "s,[@]PATH[@],$(pkgdatadir)," < $< > $@
+
+phoenix-uninstalled: phoenix.in
+ sed -e "s,[@]DATADIR[@],@abs_top_builddir@/data/uninstalled," \
+ -e "s,[@]PATH[@],@abs_top_builddir@/src," < $< > $@
+ @chmod +x $@
phoenix-test: phoenix-test.in
- sed -e "s,PKGDATADIR,$(pkgdatadir)," < $< > $@
+ sed -e "s,[@]DATADIR[@],$(pkgdatadir)/data," \
+ -e "s,[@]PATH[@],$(pkgdatadir)," < $< > $@
+
+phoenix-test-uninstalled: phoenix-test.in
+ sed -e "s,[@]DATADIR[@],@abs_top_builddir@/data/uninstalled," \
+ -e "s,[@]PATH[@],@abs_top_builddir@/src," < $< > $@
+ @chmod +x $@
+
-CLEANFILES = $(bin_SCRIPTS)
+CLEANFILES = $(bin_SCRIPTS) $(BUILT_SOURCES)
diff --git a/src/phoenix-test.in b/src/phoenix-test.in
index d341d6a..ae9a869 100644
--- a/src/phoenix-test.in
+++ b/src/phoenix-test.in
@@ -1,3 +1,3 @@
#!/bin/sh
-exec python "PKGDATADIR/phoenix-test.py" $@
+exec python "@PATH@/phoenix-test.py" --datadir=@DATADIR@ $@
diff --git a/src/phoenix.in b/src/phoenix.in
index 156f0c2..9e7735b 100644
--- a/src/phoenix.in
+++ b/src/phoenix.in
@@ -1,3 +1,3 @@
#!/bin/sh
-exec python "PKGDATADIR/phoenix.py" $@
+exec python "@PATH@/phoenix.py" --datadir=@DATADIR@$@