From 0397320f866e2a4292a79195cdae1f23712a85c2 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 7 Sep 2012 14:30:46 +0200 Subject: Also generate wrappers for running in uninstalled mode --- src/Makefile.am | 20 +++++++++++++++++--- src/phoenix-test.in | 2 +- src/phoenix.in | 2 +- 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@$@ -- cgit v1.2.3