GNU bug report logs - #8362
make install prefix inserted in source code with generated python files

Previous Next

Package: automake;

Reported by: "A.T.Hofkamp" <a.t.hofkamp <at> tue.nl>

Date: Mon, 28 Mar 2011 07:56:01 UTC

Severity: normal

Tags: confirmed

Merged with 16527

Found in version 1.14

Full log


View this message in rfc822 format

From: "A.T.Hofkamp" <a.t.hofkamp <at> tue.nl>
To: 8362 <at> debbugs.gnu.org
Subject: bug#8362: make install prefix inserted in source code with generated python files
Date: Mon, 28 Mar 2011 09:36:45 +0200
[Message part 1 (text/plain, inline)]
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
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
-------------

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.

[p.tar.gz (application/x-tar, inline)]

This bug report was last modified 1 year and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.