Received: from eggs.gnu.org ([2001:4830:134:3::10]:36074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkqmT-0006bp-An for qemu-devel@nongnu.org; Thu, 15 May 2014 04:12:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkqmM-00047C-Hl for qemu-devel@nongnu.org; Thu, 15 May 2014 04:12:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkqmM-00046x-9u for qemu-devel@nongnu.org; Thu, 15 May 2014 04:12:38 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4F8Cblf008082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 15 May 2014 04:12:37 -0400 From: Markus Armbruster References: <1399128428-25546-1-git-send-email-mreitz@redhat.com> <87y4y4pmja.fsf@blackfin.pond.sub.org> <5373FF47.7020809@redhat.com> <878uq3jzy7.fsf@blackfin.pond.sub.org> Date: Thu, 15 May 2014 10:12:33 +0200 In-Reply-To: <878uq3jzy7.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Thu, 15 May 2014 08:52:48 +0200") Message-ID: <87a9ajihou.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] iotests: Use configured python List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi Markus Armbruster writes: [...] > The problem is including generated bits, namely results of configure, > into source files. > > The Autoconf way is to substitute placeholders in FOO.in producing FOO. > > When you want to limit .in contents as much as possible, you factor out > the stuff that needs substitutions into some SUB.in, which you then > include into FOO. Requires a suitable include mechanism. In shell, > builtin source. > > But then you need to find SUB from FOO. I've seen two ways used: > > 1. Assume SUB is in the current directory. Link FOO into the build tree > to make it so. > > 2. Require FOO to be run in a way that lets it find its source > directory. If whatever runs FOO puts the full path into argv[0], you > can use that. Else, require a suitable argument or environment > variable. Uh, I left out some "obvious" details here. Revert the role of FOO and SUB. Generate FOO from FOO.in into the build tree, include the real meat from SUB.