Subject: Re: bug#8362: make install prefix inserted in source code with generated python files

From: Ralf Wildenhues <[email-masked]>
Date: Mon, 28 Mar 2011 19:51:51 +0200

Hello,

* A.T.Hofkamp wrote on Mon, Mar 28, 2011 at 09:36:45AM CEST:
> As far as I know, "make install prefix=/path/to/writable/dir" should
> only change the place where files are copied to, instead of
> injecting that new prefix into the source code. However, for Python
> source files that are generated/modified during installation, this
> does not seem to hold:

> ------------- Makefile.am
> prefix=@prefix@
> exec_prefix=@exec_prefix@
> libexecdir = @libexecdir@
> libdir = @libdir@
> 
> PYTHON_VERSION=@PYTHON_VERSION@
> SITEPACKAGES=$(libdir)/python$(PYTHON_VERSION)/site-packages
> SED=@sed@
> 
> prog_PYTHON=prog/__init__.py prog/x.py
> progdir = $(SITEPACKAGES)/prog
> 
> prog/x.py: x.src
>         $(SED) -e "s,%LIBEXEC%,$(libexecdir)," < x.src > prog/x.py

Looks like it.  Can you work around this issue by adding

all-local: $(prog_PYTHON)

to the Makefile.am?

Thanks for the report,
Ralf