* python/Makefile.am (EXTRA_DIST): Add sps-common.in, sps.in and sps-local.in. (edit): New. (sps, sps-local): New rules. --- swilena/ChangeLog | 9 +++++++++ swilena/python/Makefile.am | 27 ++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/swilena/ChangeLog b/swilena/ChangeLog index fb854f5..89da33d 100644 --- a/swilena/ChangeLog +++ b/swilena/ChangeLog @@ -1,3 +1,12 @@ +2010-04-01 Roland Levillain roland@lrde.epita.fr + + Have Make generate the Swilena Python Shell (sps). + + * python/Makefile.am (EXTRA_DIST): Add sps-common.in, sps.in and + sps-local.in. + (edit): New. + (sps, sps-local): New rules. + 2010-02-08 Roland Levillain roland@lrde.epita.fr
Add a Swilena wrapper for mln::image2dmln::value::rgb8. diff --git a/swilena/python/Makefile.am b/swilena/python/Makefile.am index 44b9210..9693c2e 100644 --- a/swilena/python/Makefile.am +++ b/swilena/python/Makefile.am @@ -260,7 +260,6 @@ image2d_rgb8-wrap.cc: $(top_srcdir)/swilena/println.ixx ## Swilena Python Shell (sps). ## ## ---------------------------- ##
-# FIXME: We might want to rename this shell as something else. python_PYTHON += sps.py
# The script to be used in installed distributions. @@ -268,6 +267,32 @@ bin_SCRIPTS = sps # The script to be used in non-installed build trees. noinst_SCRIPTS = sps-local
+EXTRA_DIST += sps-common.in sps.in sps-local.in + +# Use Make to generate shell scripts (`sps' and `sps-local') instead +# of `configure', as advised by Autoconf's manual (see section +# ``Installation Directory Variables''). +edit = sed \ + -e 's|@abs_srcdir[@]|$(abs_srcdir)|g' \ + -e 's|@abs_builddir[@]|$(abs_builddir)|g' \ + -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \ + -e 's|@libdir[@]|$(libdir)|g' \ + -e 's|@pythondir[@]|$(pythondir)|g' \ + -e 's|@PYTHON[@]|$(PYTHON)|g' + +sps sps-local: Makefile $(srcdir)/sps-common.in + rm -f $@ $@.tmp + srcdir=''; \ + test -f ./$@.in || srcdir=$(srcdir)/; \ + cp $${srcdir}/sps-common.in $@.tmp; \ + $(edit) $${srcdir}$@.in >>$@.tmp + chmod +x $@.tmp + chmod a-w $@.tmp + mv $@.tmp $@ + +sps: $(srcdir)/sps.in +sps-local: $(srcdir)/sps-local.in + CLEANFILES += $(bin_SCRIPTS) $(noinst_SCRIPTS)