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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: automake; Reported by: "A.T.Hofkamp" <a.t.hofkamp@HIDDEN>; dated Mon, 28 Mar 2011 07:56:01 UTC; Maintainer for automake is bug-automake@HIDDEN.

Message received at 8362 <at> debbugs.gnu.org:


Received: (at 8362) by debbugs.gnu.org; 29 Mar 2011 06:18:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 29 02:18:02 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Q4SFe-0005Yq-1O
	for submit <at> debbugs.gnu.org; Tue, 29 Mar 2011 02:18:02 -0400
Received: from mailhost.tue.nl ([131.155.2.19])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <a.t.hofkamp@HIDDEN>) id 1Q4SFb-0005YZ-Im
	for 8362 <at> debbugs.gnu.org; Tue, 29 Mar 2011 02:18:00 -0400
Received: from pastinakel.tue.nl (localhost [127.0.0.1])
	by mailhost.tue.nl (Postfix) with ESMTP id A526D73038;
	Tue, 29 Mar 2011 08:17:53 +0200 (CEST)
X-Virus-Scanned: amavisd-new at tue.nl
Received: from mailhost.tue.nl ([131.155.2.19])
	by pastinakel.tue.nl (pastinakel.tue.nl [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id mDUckjmFG51N; Tue, 29 Mar 2011 08:17:53 +0200 (CEST)
Received: from se-162.se.wtb.tue.nl (se-162.se.wtb.tue.nl [131.155.63.35])
	by mailhost.tue.nl (Postfix) with ESMTP id 812D17300E;
	Tue, 29 Mar 2011 08:17:53 +0200 (CEST)
Message-ID: <4D917991.30705@HIDDEN>
Date: Tue, 29 Mar 2011 08:17:53 +0200
From: "A.T.Hofkamp" <a.t.hofkamp@HIDDEN>
User-Agent: Thunderbird 2.0.0.24 (X11/20101213)
MIME-Version: 1.0
To: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
Subject: Re: bug#8362: make install prefix inserted in source code with
	generated python files
References: <4D903A8D.2030309@HIDDEN> <20110328175151.GC13973@HIDDEN>
In-Reply-To: <20110328175151.GC13973@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -5.1 (-----)
X-Debbugs-Envelope-To: 8362
Cc: "8362 <at> debbugs.gnu.org" <8362 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.6 (----)

Ralf Wildenhues wrote:
> Looks like it.  Can you work around this issue by adding
> 
> all-local: $(prog_PYTHON)
> 
> to the Makefile.am?

Confirmed that this addition fixes the problem for me, both with the 'p' example and the real case.
Thanks for the quick fix.

Albert




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#8362; Package automake. Full text available.

Message received at 8362 <at> debbugs.gnu.org:


Received: (at 8362) by debbugs.gnu.org; 28 Mar 2011 17:52:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 28 13:52:04 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Q4Gbj-0003Bm-Ir
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2011 13:52:04 -0400
Received: from mailout-de.gmx.net ([213.165.64.23])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1Q4Gbg-0003BI-FY
	for 8362 <at> debbugs.gnu.org; Mon, 28 Mar 2011 13:52:01 -0400
Received: (qmail invoked by alias); 28 Mar 2011 17:51:53 -0000
Received: from xdsl-89-0-94-92.netcologne.de (EHLO localhost.localdomain)
	[89.0.94.92]
	by mail.gmx.net (mp025) with SMTP; 28 Mar 2011 19:51:53 +0200
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX1+YEwUIrFiYT8Z8mkmitNXcNO3yJ37XvoiwV23fSw
	l8QXGHfdMMJW43
Received: from ralf by localhost.localdomain with local (Exim 4.72)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1Q4GbX-0006fz-Fj; Mon, 28 Mar 2011 19:51:51 +0200
Date: Mon, 28 Mar 2011 19:51:51 +0200
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: "A.T.Hofkamp" <a.t.hofkamp@HIDDEN>
Subject: Re: bug#8362: make install prefix inserted in source code with
	generated python files
Message-ID: <20110328175151.GC13973@HIDDEN>
References: <4D903A8D.2030309@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D903A8D.2030309@HIDDEN>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 8362
Cc: 8362 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)

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




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#8362; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Mar 2011 07:55:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 28 03:55:41 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Q47Ia-00053j-8S
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2011 03:55:40 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <a.t.hofkamp@HIDDEN>) id 1Q470U-0004dr-OL
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2011 03:36:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <a.t.hofkamp@HIDDEN>) id 1Q470O-0001WE-RR
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2011 03:36:53 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,
	T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:41860)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <a.t.hofkamp@HIDDEN>) id 1Q470O-0001W8-M3
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2011 03:36:52 -0400
Received: from [140.186.70.92] (port=33381 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q470N-0007Rn-0j
	for bug-automake@HIDDEN; Mon, 28 Mar 2011 03:36:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <a.t.hofkamp@HIDDEN>) id 1Q470K-0001Vp-Ij
	for bug-automake@HIDDEN; Mon, 28 Mar 2011 03:36:49 -0400
Received: from mailhost.tue.nl ([131.155.2.19]:54874)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <a.t.hofkamp@HIDDEN>) id 1Q470K-0001Vc-Ay
	for bug-automake@HIDDEN; Mon, 28 Mar 2011 03:36:48 -0400
Received: from pastinakel.tue.nl (localhost [127.0.0.1])
	by mailhost.tue.nl (Postfix) with ESMTP id 37228730A2
	for <bug-automake@HIDDEN>; Mon, 28 Mar 2011 09:36:46 +0200 (CEST)
X-Virus-Scanned: amavisd-new at tue.nl
Received: from mailhost.tue.nl ([131.155.2.19])
	by pastinakel.tue.nl (pastinakel.tue.nl [127.0.0.1]) (amavisd-new,
	port 10024) with ESMTP id SPykl2C6h-uI for <bug-automake@HIDDEN>;
	Mon, 28 Mar 2011 09:36:45 +0200 (CEST)
Received: from se-162.se.wtb.tue.nl (se-162.se.wtb.tue.nl [131.155.63.35])
	by mailhost.tue.nl (Postfix) with ESMTP id ED9317309F
	for <bug-automake@HIDDEN>; Mon, 28 Mar 2011 09:36:45 +0200 (CEST)
Message-ID: <4D903A8D.2030309@HIDDEN>
Date: Mon, 28 Mar 2011 09:36:45 +0200
From: "A.T.Hofkamp" <a.t.hofkamp@HIDDEN>
User-Agent: Thunderbird 2.0.0.24 (X11/20101213)
MIME-Version: 1.0
To: bug-automake@HIDDEN
Subject: make install prefix inserted in source code with generated python
	files
Content-Type: multipart/mixed; boundary="------------000201030900080803000806"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 199.232.76.165
X-Spam-Score: -6.6 (------)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 28 Mar 2011 03:55:39 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.6 (------)

This is a multi-part message in MIME format.
--------------000201030900080803000806
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

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.


--------------000201030900080803000806
Content-Type: application/x-tar;
 name="p.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="p.tar.gz"

H4sIAEUOi00AA+1YbW/iOBDu18uv8HFdFSSSkBBAWx0nWJrdor7AFXq6U1VlQ2LAR16s2N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XGn0VOK4t4nCeqi
XtnKekprZlHyU9/5w76bDEe33d7Ldk+ZDKf2uD+46n+wJ93Tav5crRAlp9WX7rWXEkUBddft
QekAcYRaKUqM7mfSspQy4i6f4ml1N3Qtkzv5MJnneS4jlZ/Az76oCUKssPr2Z/B6NtXixWv1
Cvq1kJ2/7QSTDCghISEhISEhISEh8UPiH/Ig/pcAKAAA
--------------000201030900080803000806--




Acknowledgement sent to "A.T.Hofkamp" <a.t.hofkamp@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#8362; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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