bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8362: make install prefix inserted in source code with generated pyt


From: A.T.Hofkamp
Subject: bug#8362: make install prefix inserted in source code with generated python files
Date: Mon, 28 Mar 2011 09:36:45 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20101213)

Hello,

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
address@hidden@
address@hidden@
libexecdir = @libexecdir@
libdir = @libdir@

address@hidden@
SITEPACKAGES=$(libdir)/python$(PYTHON_VERSION)/site-packages
address@hidden@

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
-------------

prog/x.py is generated from x.src by inserting the libexecdir path into it.

During install, the following happens at my system:
(/somewhere is a fake path for demonstration purposes only,
 also replaced irrelevant lengthy output lines by ... )

+ ./configure --prefix=/somewhere
checking for a BSD-compatible install... /usr/bin/install -c
...

+ make
make: Nothing to be done for `all'.

+ make prefix=/home/hat/tmp/p/installed install
...
sed -e "s,%LIBEXEC%,/home/hat/tmp/p/installed/libexec," < x.src > prog/x.py
...


The prog/x.py rule was run during 'make install' rather than 'make'. As a result, the wrong libexecdir got included.

Tested with autoconf 2.59, automake 1.9.6
and (by temporary install) autoconf 2.68, automake 1.11.1


Attached a demo directory 'p' that demonstrates the issue.

Attachment: p.tar.gz
Description: Unix tar archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]